Skip to content

Commit ea72d12

Browse files
KobzolZoxc
authored andcommitted
Perform ThinLTO on Windows dist builder in try builds
1 parent 2694c65 commit ea72d12

File tree

2 files changed

+20
-12
lines changed

2 files changed

+20
-12
lines changed

.github/workflows/ci.yml

+6-5
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ jobs:
438438
os: windows-2019-8core-32gb
439439
- name: dist-x86_64-msvc
440440
env:
441-
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --host=x86_64-pc-windows-msvc --target=x86_64-pc-windows-msvc --enable-full-tools --enable-profiler --set rust.codegen-units=1"
441+
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --host=x86_64-pc-windows-msvc --target=x86_64-pc-windows-msvc --enable-full-tools --enable-profiler --set rust.codegen-units=1 --set rust.lto=thin"
442442
SCRIPT: python x.py build --set rust.debug=true opt-dist && PGO_HOST=x86_64-pc-windows-msvc ./build/x86_64-pc-windows-msvc/stage0-tools-bin/opt-dist windows-ci -- python x.py dist bootstrap --include-default-paths
443443
DIST_REQUIRE_ALL_TOOLS: 1
444444
os: windows-2019-8core-32gb
@@ -592,7 +592,6 @@ jobs:
592592
try:
593593
name: "try - ${{ matrix.name }}"
594594
env:
595-
DIST_TRY_BUILD: 1
596595
CI_JOB_NAME: "${{ matrix.name }}"
597596
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
598597
HEAD_SHA: "${{ github.event.pull_request.head.sha || github.sha }}"
@@ -610,10 +609,12 @@ jobs:
610609
strategy:
611610
matrix:
612611
include:
613-
- name: dist-x86_64-linux
612+
- name: dist-x86_64-msvc
614613
env:
615-
CODEGEN_BACKENDS: "llvm,cranelift"
616-
os: ubuntu-20.04-16core-64gb
614+
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --host=x86_64-pc-windows-msvc --target=x86_64-pc-windows-msvc --enable-full-tools --enable-profiler --set rust.codegen-units=1 --set rust.lto=thin"
615+
SCRIPT: python x.py build --set rust.debug=true opt-dist && PGO_HOST=x86_64-pc-windows-msvc ./build/x86_64-pc-windows-msvc/stage0-tools-bin/opt-dist windows-ci -- python x.py dist bootstrap --include-default-paths
616+
DIST_REQUIRE_ALL_TOOLS: 1
617+
os: windows-2019-8core-32gb
617618
defaults:
618619
run:
619620
shell: "${{ contains(matrix.os, 'windows') && 'msys2 {0}' || 'bash' }}"

src/ci/github-actions/ci.yml

+14-7
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,7 @@ jobs:
688688
--enable-full-tools
689689
--enable-profiler
690690
--set rust.codegen-units=1
691+
--set rust.lto=thin
691692
SCRIPT: python x.py build --set rust.debug=true opt-dist && PGO_HOST=x86_64-pc-windows-msvc ./build/x86_64-pc-windows-msvc/stage0-tools-bin/opt-dist windows-ci -- python x.py dist bootstrap --include-default-paths
692693
DIST_REQUIRE_ALL_TOOLS: 1
693694
<<: *job-windows-8c
@@ -753,19 +754,25 @@ jobs:
753754
<<: *base-ci-job
754755
name: try - ${{ matrix.name }}
755756
env:
756-
DIST_TRY_BUILD: 1
757+
# DIST_TRY_BUILD: 1
757758
<<: [*shared-ci-variables, *prod-variables]
758759
if: github.event_name == 'push' && (((github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust') || ((github.ref == 'refs/heads/automation/bors/try') && github.repository == 'rust-lang/rust'))
759760
strategy:
760761
matrix:
761762
include:
762-
- &dist-x86_64-linux
763-
name: dist-x86_64-linux
763+
- name: dist-x86_64-msvc
764764
env:
765-
CODEGEN_BACKENDS: llvm,cranelift
766-
<<: *job-linux-16c
767-
768-
765+
RUST_CONFIGURE_ARGS: >-
766+
--build=x86_64-pc-windows-msvc
767+
--host=x86_64-pc-windows-msvc
768+
--target=x86_64-pc-windows-msvc
769+
--enable-full-tools
770+
--enable-profiler
771+
--set rust.codegen-units=1
772+
--set rust.lto=thin
773+
SCRIPT: python x.py build --set rust.debug=true opt-dist && PGO_HOST=x86_64-pc-windows-msvc ./build/x86_64-pc-windows-msvc/stage0-tools-bin/opt-dist windows-ci -- python x.py dist bootstrap --include-default-paths
774+
DIST_REQUIRE_ALL_TOOLS: 1
775+
<<: *job-windows-8c
769776
master:
770777
name: master
771778
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)