Skip to content

Commit d845c39

Browse files
committed
avoid compiler_for for dist steps and force the current compiler
Signed-off-by: onur-ozkan <[email protected]>
1 parent bb2cc59 commit d845c39

File tree

1 file changed

+15
-58
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+15
-58
lines changed

src/bootstrap/src/core/build_steps/dist.rs

Lines changed: 15 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -421,11 +421,7 @@ impl Step for Rustc {
421421

422422
if let Some(ra_proc_macro_srv) = builder.ensure_if_default(
423423
tool::RustAnalyzerProcMacroSrv {
424-
compiler: builder.compiler_for(
425-
compiler.stage,
426-
builder.config.build,
427-
compiler.host,
428-
),
424+
compiler: builder.compiler(compiler.stage, builder.config.build),
429425
target: compiler.host,
430426
},
431427
builder.kind,
@@ -661,11 +657,7 @@ impl Step for Std {
661657

662658
fn make_run(run: RunConfig<'_>) {
663659
run.builder.ensure(Std {
664-
compiler: run.builder.compiler_for(
665-
run.builder.top_stage,
666-
run.builder.config.build,
667-
run.target,
668-
),
660+
compiler: run.builder.compiler(run.builder.top_stage, run.builder.config.build),
669661
target: run.target,
670662
});
671663
}
@@ -683,7 +675,7 @@ impl Step for Std {
683675
let mut tarball = Tarball::new(builder, "rust-std", &target.triple);
684676
tarball.include_target_in_component_name(true);
685677

686-
let compiler_to_use = builder.compiler_for(compiler.stage, compiler.host, target);
678+
let compiler_to_use = builder.compiler(compiler.stage, compiler.host);
687679
let stamp = build_stamp::libstd_stamp(builder, compiler_to_use, target);
688680
verify_uefi_rlib_format(builder, target, &stamp);
689681
copy_target_libs(builder, target, tarball.image_dir(), &stamp);
@@ -713,11 +705,7 @@ impl Step for RustcDev {
713705

714706
fn make_run(run: RunConfig<'_>) {
715707
run.builder.ensure(RustcDev {
716-
compiler: run.builder.compiler_for(
717-
run.builder.top_stage,
718-
run.builder.config.build,
719-
run.target,
720-
),
708+
compiler: run.builder.compiler(run.builder.top_stage, run.builder.config.build),
721709
target: run.target,
722710
});
723711
}
@@ -733,7 +721,7 @@ impl Step for RustcDev {
733721

734722
let tarball = Tarball::new(builder, "rustc-dev", &target.triple);
735723

736-
let compiler_to_use = builder.compiler_for(compiler.stage, compiler.host, target);
724+
let compiler_to_use = builder.compiler(compiler.stage, compiler.host);
737725
let stamp = build_stamp::librustc_stamp(builder, compiler_to_use, target);
738726
copy_target_libs(builder, target, tarball.image_dir(), &stamp);
739727

@@ -775,11 +763,7 @@ impl Step for Analysis {
775763
// Find the actual compiler (handling the full bootstrap option) which
776764
// produced the save-analysis data because that data isn't copied
777765
// through the sysroot uplifting.
778-
compiler: run.builder.compiler_for(
779-
run.builder.top_stage,
780-
run.builder.config.build,
781-
run.target,
782-
),
766+
compiler: run.builder.compiler(run.builder.top_stage, run.builder.config.build),
783767
target: run.target,
784768
});
785769
}
@@ -1124,11 +1108,7 @@ impl Step for Cargo {
11241108

11251109
fn make_run(run: RunConfig<'_>) {
11261110
run.builder.ensure(Cargo {
1127-
compiler: run.builder.compiler_for(
1128-
run.builder.top_stage,
1129-
run.builder.config.build,
1130-
run.target,
1131-
),
1111+
compiler: run.builder.compiler(run.builder.top_stage, run.builder.config.build),
11321112
target: run.target,
11331113
});
11341114
}
@@ -1145,6 +1125,7 @@ impl Step for Cargo {
11451125
let mut tarball = Tarball::new(builder, "cargo", &target.triple);
11461126
tarball.set_overlay(OverlayKind::Cargo);
11471127

1128+
assert!(false, "!!!!!!!! {:?} -- {:?}", self.compiler, cargo.tool_path);
11481129
tarball.add_file(cargo.tool_path, "bin", 0o755);
11491130
tarball.add_file(etc.join("_cargo"), "share/zsh/site-functions", 0o644);
11501131
tarball.add_renamed_file(etc.join("cargo.bashcomp.sh"), "etc/bash_completion.d", "cargo");
@@ -1173,11 +1154,7 @@ impl Step for Rls {
11731154

11741155
fn make_run(run: RunConfig<'_>) {
11751156
run.builder.ensure(Rls {
1176-
compiler: run.builder.compiler_for(
1177-
run.builder.top_stage,
1178-
run.builder.config.build,
1179-
run.target,
1180-
),
1157+
compiler: run.builder.compiler(run.builder.top_stage, run.builder.config.build),
11811158
target: run.target,
11821159
});
11831160
}
@@ -1215,11 +1192,7 @@ impl Step for RustAnalyzer {
12151192

12161193
fn make_run(run: RunConfig<'_>) {
12171194
run.builder.ensure(RustAnalyzer {
1218-
compiler: run.builder.compiler_for(
1219-
run.builder.top_stage,
1220-
run.builder.config.build,
1221-
run.target,
1222-
),
1195+
compiler: run.builder.compiler(run.builder.top_stage, run.builder.config.build),
12231196
target: run.target,
12241197
});
12251198
}
@@ -1257,11 +1230,7 @@ impl Step for Clippy {
12571230

12581231
fn make_run(run: RunConfig<'_>) {
12591232
run.builder.ensure(Clippy {
1260-
compiler: run.builder.compiler_for(
1261-
run.builder.top_stage,
1262-
run.builder.config.build,
1263-
run.target,
1264-
),
1233+
compiler: run.builder.compiler(run.builder.top_stage, run.builder.config.build),
12651234
target: run.target,
12661235
});
12671236
}
@@ -1304,11 +1273,7 @@ impl Step for Miri {
13041273

13051274
fn make_run(run: RunConfig<'_>) {
13061275
run.builder.ensure(Miri {
1307-
compiler: run.builder.compiler_for(
1308-
run.builder.top_stage,
1309-
run.builder.config.build,
1310-
run.target,
1311-
),
1276+
compiler: run.builder.compiler(run.builder.top_stage, run.builder.config.build),
13121277
target: run.target,
13131278
});
13141279
}
@@ -1442,11 +1407,7 @@ impl Step for Rustfmt {
14421407

14431408
fn make_run(run: RunConfig<'_>) {
14441409
run.builder.ensure(Rustfmt {
1445-
compiler: run.builder.compiler_for(
1446-
run.builder.top_stage,
1447-
run.builder.config.build,
1448-
run.target,
1449-
),
1410+
compiler: run.builder.compiler(run.builder.top_stage, run.builder.config.build),
14501411
target: run.target,
14511412
});
14521413
}
@@ -1496,7 +1457,7 @@ impl Step for Extended {
14961457
fn run(self, builder: &Builder<'_>) {
14971458
let target = self.target;
14981459
let stage = self.stage;
1499-
let compiler = builder.compiler_for(self.stage, self.host, self.target);
1460+
let compiler = builder.compiler(self.stage, self.host);
15001461

15011462
builder.info(&format!("Dist extended stage{} ({})", compiler.stage, target));
15021463

@@ -2260,11 +2221,7 @@ impl Step for LlvmBitcodeLinker {
22602221

22612222
fn make_run(run: RunConfig<'_>) {
22622223
run.builder.ensure(LlvmBitcodeLinker {
2263-
compiler: run.builder.compiler_for(
2264-
run.builder.top_stage,
2265-
run.builder.config.build,
2266-
run.target,
2267-
),
2224+
compiler: run.builder.compiler(run.builder.top_stage, run.builder.config.build),
22682225
target: run.target,
22692226
});
22702227
}

0 commit comments

Comments
 (0)