Skip to content

Commit a619e25

Browse files
authored
Rollup merge of #78706 - bjorn3:fix_run_make_without_llvm, r=Mark-Simulacrum
Fix run-make tests running when LLVM is disabled The `--cc`, `--cxx`, `--cflags` and `--ar` flags were only passed to compiletest when `builder.config.llvm_enabled()` returned true. This is preventing me from running the tests on cg_clif.
2 parents 7d9ad6d + 39103ce commit a619e25

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

Diff for: src/bootstrap/test.rs

+15-11
Original file line numberDiff line numberDiff line change
@@ -1205,17 +1205,6 @@ note: if you're sure you want to do this, please open an issue as to why. In the
12051205
// Only pass correct values for these flags for the `run-make` suite as it
12061206
// requires that a C++ compiler was configured which isn't always the case.
12071207
if !builder.config.dry_run && matches!(suite, "run-make" | "run-make-fulldeps") {
1208-
cmd.arg("--cc")
1209-
.arg(builder.cc(target))
1210-
.arg("--cxx")
1211-
.arg(builder.cxx(target).unwrap())
1212-
.arg("--cflags")
1213-
.arg(builder.cflags(target, GitRepo::Rustc).join(" "));
1214-
copts_passed = true;
1215-
if let Some(ar) = builder.ar(target) {
1216-
cmd.arg("--ar").arg(ar);
1217-
}
1218-
12191208
// The llvm/bin directory contains many useful cross-platform
12201209
// tools. Pass the path to run-make tests so they can use them.
12211210
let llvm_bin_path = llvm_config
@@ -1241,6 +1230,21 @@ note: if you're sure you want to do this, please open an issue as to why. In the
12411230
}
12421231
}
12431232

1233+
// Only pass correct values for these flags for the `run-make` suite as it
1234+
// requires that a C++ compiler was configured which isn't always the case.
1235+
if !builder.config.dry_run && matches!(suite, "run-make" | "run-make-fulldeps") {
1236+
cmd.arg("--cc")
1237+
.arg(builder.cc(target))
1238+
.arg("--cxx")
1239+
.arg(builder.cxx(target).unwrap())
1240+
.arg("--cflags")
1241+
.arg(builder.cflags(target, GitRepo::Rustc).join(" "));
1242+
copts_passed = true;
1243+
if let Some(ar) = builder.ar(target) {
1244+
cmd.arg("--ar").arg(ar);
1245+
}
1246+
}
1247+
12441248
if !llvm_components_passed {
12451249
cmd.arg("--llvm-components").arg("");
12461250
}

0 commit comments

Comments
 (0)