Auto merge of #138039 - onur-ozkan:handle-forced-compiler-on-tools, r… · rust-lang/rust@dcee436 (original) (raw)
`@@ -421,7 +421,11 @@ impl Step for Rustc {
`
421
421
``
422
422
`if let Some(ra_proc_macro_srv) = builder.ensure_if_default(
`
423
423
` tool::RustAnalyzerProcMacroSrv {
`
424
``
`-
compiler: builder.compiler(compiler.stage, builder.config.build),
`
``
424
`+
compiler: builder.compiler_for(
`
``
425
`+
compiler.stage,
`
``
426
`+
builder.config.build,
`
``
427
`+
compiler.host,
`
``
428
`+
),
`
425
429
`target: compiler.host,
`
426
430
`},
`
427
431
` builder.kind,
`
`@@ -771,7 +775,11 @@ impl Step for Analysis {
`
771
775
`// Find the actual compiler (handling the full bootstrap option) which
`
772
776
`// produced the save-analysis data because that data isn't copied
`
773
777
`// through the sysroot uplifting.
`
774
``
`-
compiler: run.builder.compiler(run.builder.top_stage, run.builder.config.build),
`
``
778
`+
compiler: run.builder.compiler_for(
`
``
779
`+
run.builder.top_stage,
`
``
780
`+
run.builder.config.build,
`
``
781
`+
run.target,
`
``
782
`+
),
`
775
783
`target: run.target,
`
776
784
`});
`
777
785
`}
`
`@@ -1116,7 +1124,11 @@ impl Step for Cargo {
`
1116
1124
``
1117
1125
`fn make_run(run: RunConfig<'_>) {
`
1118
1126
` run.builder.ensure(Cargo {
`
1119
``
`-
compiler: run.builder.compiler(run.builder.top_stage, run.builder.config.build),
`
``
1127
`+
compiler: run.builder.compiler_for(
`
``
1128
`+
run.builder.top_stage,
`
``
1129
`+
run.builder.config.build,
`
``
1130
`+
run.target,
`
``
1131
`+
),
`
1120
1132
`target: run.target,
`
1121
1133
`});
`
1122
1134
`}
`
`@@ -1161,7 +1173,11 @@ impl Step for Rls {
`
1161
1173
``
1162
1174
`fn make_run(run: RunConfig<'_>) {
`
1163
1175
` run.builder.ensure(Rls {
`
1164
``
`-
compiler: run.builder.compiler(run.builder.top_stage, run.builder.config.build),
`
``
1176
`+
compiler: run.builder.compiler_for(
`
``
1177
`+
run.builder.top_stage,
`
``
1178
`+
run.builder.config.build,
`
``
1179
`+
run.target,
`
``
1180
`+
),
`
1165
1181
`target: run.target,
`
1166
1182
`});
`
1167
1183
`}
`
`@@ -1199,7 +1215,11 @@ impl Step for RustAnalyzer {
`
1199
1215
``
1200
1216
`fn make_run(run: RunConfig<'_>) {
`
1201
1217
` run.builder.ensure(RustAnalyzer {
`
1202
``
`-
compiler: run.builder.compiler(run.builder.top_stage, run.builder.config.build),
`
``
1218
`+
compiler: run.builder.compiler_for(
`
``
1219
`+
run.builder.top_stage,
`
``
1220
`+
run.builder.config.build,
`
``
1221
`+
run.target,
`
``
1222
`+
),
`
1203
1223
`target: run.target,
`
1204
1224
`});
`
1205
1225
`}
`
`@@ -1237,7 +1257,11 @@ impl Step for Clippy {
`
1237
1257
``
1238
1258
`fn make_run(run: RunConfig<'_>) {
`
1239
1259
` run.builder.ensure(Clippy {
`
1240
``
`-
compiler: run.builder.compiler(run.builder.top_stage, run.builder.config.build),
`
``
1260
`+
compiler: run.builder.compiler_for(
`
``
1261
`+
run.builder.top_stage,
`
``
1262
`+
run.builder.config.build,
`
``
1263
`+
run.target,
`
``
1264
`+
),
`
1241
1265
`target: run.target,
`
1242
1266
`});
`
1243
1267
`}
`
`@@ -1280,7 +1304,11 @@ impl Step for Miri {
`
1280
1304
``
1281
1305
`fn make_run(run: RunConfig<'_>) {
`
1282
1306
` run.builder.ensure(Miri {
`
1283
``
`-
compiler: run.builder.compiler(run.builder.top_stage, run.builder.config.build),
`
``
1307
`+
compiler: run.builder.compiler_for(
`
``
1308
`+
run.builder.top_stage,
`
``
1309
`+
run.builder.config.build,
`
``
1310
`+
run.target,
`
``
1311
`+
),
`
1284
1312
`target: run.target,
`
1285
1313
`});
`
1286
1314
`}
`
`@@ -1414,7 +1442,11 @@ impl Step for Rustfmt {
`
1414
1442
``
1415
1443
`fn make_run(run: RunConfig<'_>) {
`
1416
1444
` run.builder.ensure(Rustfmt {
`
1417
``
`-
compiler: run.builder.compiler(run.builder.top_stage, run.builder.config.build),
`
``
1445
`+
compiler: run.builder.compiler_for(
`
``
1446
`+
run.builder.top_stage,
`
``
1447
`+
run.builder.config.build,
`
``
1448
`+
run.target,
`
``
1449
`+
),
`
1418
1450
`target: run.target,
`
1419
1451
`});
`
1420
1452
`}
`
`@@ -1464,7 +1496,7 @@ impl Step for Extended {
`
1464
1496
`fn run(self, builder: &Builder<'_>) {
`
1465
1497
`let target = self.target;
`
1466
1498
`let stage = self.stage;
`
1467
``
`-
let compiler = builder.compiler(self.stage, self.host);
`
``
1499
`+
let compiler = builder.compiler_for(self.stage, self.host, self.target);
`
1468
1500
``
1469
1501
` builder.info(&format!("Dist extended stage{} ({})", compiler.stage, target));
`
1470
1502
``
`@@ -2112,8 +2144,7 @@ pub fn maybe_install_llvm_target(builder: &Builder<'_>, target: TargetSelection,
`
2112
2144
`),
`
2113
2145
`)]
`
2114
2146
`pub fn maybe_install_llvm_runtime(builder: &Builder<'_>, target: TargetSelection, sysroot: &Path) {
`
2115
``
`-
let dst_libdir =
`
2116
``
`-
sysroot.join(builder.sysroot_libdir_relative(Compiler { stage: 1, host: target }));
`
``
2147
`+
let dst_libdir = sysroot.join(builder.sysroot_libdir_relative(Compiler::new(1, target)));
`
2117
2148
`// We do not need to copy LLVM files into the sysroot if it is not
`
2118
2149
`// dynamically linked; it is already included into librustc_llvm
`
2119
2150
`// statically.
`
`@@ -2228,7 +2259,11 @@ impl Step for LlvmBitcodeLinker {
`
2228
2259
``
2229
2260
`fn make_run(run: RunConfig<'_>) {
`
2230
2261
` run.builder.ensure(LlvmBitcodeLinker {
`
2231
``
`-
compiler: run.builder.compiler(run.builder.top_stage, run.builder.config.build),
`
``
2262
`+
compiler: run.builder.compiler_for(
`
``
2263
`+
run.builder.top_stage,
`
``
2264
`+
run.builder.config.build,
`
``
2265
`+
run.target,
`
``
2266
`+
),
`
2232
2267
`target: run.target,
`
2233
2268
`});
`
2234
2269
`}
`