Skip to content

Commit d732d09

Browse files
Auto merge of #142963 - Kobzol:try-build-skip, r=<try>
Skip unnecessary components in x64 try builds We unnecessarily rebuild `wasm-component-ld`, `llvm-bitcode-linker` and Cranelift during the intermediate PGO builds several times times, which is unnecessarily and increases the duration of try builds. This PR also disables some unnecessary dist components. r? `@jieyouxu`
2 parents 36b2163 + 76a8080 commit d732d09

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

src/ci/docker/host-x86_64/dist-x86_64-linux/dist.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,7 @@ python3 ../x.py build --set rust.debug=true opt-dist
1010
build-manifest bootstrap
1111

1212
# Use GCC for building GCC, as it seems to behave badly when built with Clang
13-
CC=/rustroot/bin/cc CXX=/rustroot/bin/c++ python3 ../x.py dist gcc
13+
# Only build GCC on full builds, not try builds
14+
if [ "${DIST_TRY_BUILD:-0}" == "0" ]; then
15+
CC=/rustroot/bin/cc CXX=/rustroot/bin/c++ python3 ../x.py dist gcc
16+
fi

src/tools/opt-dist/src/exec.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,15 @@ impl Bootstrap {
188188
}
189189
}
190190

191-
fn add_shared_x_flags(env: &Environment, cmd: CmdBuilder) -> CmdBuilder {
191+
fn add_shared_x_flags(env: &Environment, mut cmd: CmdBuilder) -> CmdBuilder {
192+
// Skip things that cannot be skipped through `x ... --skip`
193+
cmd = cmd
194+
.arg("--set")
195+
.arg("rust.llvm-bitcode-linker=false")
196+
// Skip wasm-component-ld
197+
.arg("--set")
198+
.arg("build.extended=false")
199+
.arg("--set")
200+
.arg("rust.codegen-backends=['llvm']");
192201
if env.is_fast_try_build() { cmd.arg("--set").arg("rust.deny-warnings=false") } else { cmd }
193202
}

src/tools/opt-dist/src/main.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,13 +407,18 @@ fn main() -> anyhow::Result<()> {
407407
for target in [
408408
"rust-docs",
409409
"rustc-docs",
410+
"rustc-dev",
411+
"rust-dev",
410412
"rust-docs-json",
411413
"rust-analyzer",
412414
"rustc-src",
415+
"extended",
413416
"clippy",
414417
"miri",
415418
"rustfmt",
416419
"gcc",
420+
"generate-copyright",
421+
"bootstrap",
417422
] {
418423
build_args.extend(["--skip".to_string(), target.to_string()]);
419424
}

0 commit comments

Comments
 (0)