Skip to content

Commit a094db8

Browse files
Auto merge of #143898 - ognevny:opt-dist-rustc-rebuild, r=<try>
opt-dist: rebuild rustc when doing static LLVM builds when building LLVM it's obvious that in case of shared build rustc doesn't need to be recompiled, but with static builds it would be better to compile rustc again to ensure we linked proper library. maybe I didn't understand the pipeline correctly, but it was strange for me to see that in Stage 5 LLVM is built while rustc is not <!-- homu-ignore:start --> <!-- If this PR is related to an unstable feature or an otherwise tracked effort, please link to the relevant tracking issue here. If you don't know of a related tracking issue or there are none, feel free to ignore this. This PR will get automatically assigned to a reviewer. In case you would like a specific user to review your work, you can assign it to them by using r? <reviewer name> --> <!-- homu-ignore:end --> r? `@Kobzol` try-job: dist-x86_64-msvc try-job: dist-x86_64-linux
2 parents cccf075 + 4805489 commit a094db8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,11 @@ fn execute_pipeline(
343343

344344
let mut dist = Bootstrap::dist(env, &dist_args)
345345
.llvm_pgo_optimize(&llvm_pgo_profile)
346-
.rustc_pgo_optimize(&rustc_pgo_profile)
347-
.avoid_rustc_rebuild();
346+
.rustc_pgo_optimize(&rustc_pgo_profile);
347+
348+
if env.supports_shared_llvm() {
349+
dist = dist.avoid_rustc_rebuild()
350+
}
348351

349352
for bolt_profile in bolt_profiles {
350353
dist = dist.with_bolt_profile(bolt_profile);

0 commit comments

Comments
 (0)