Skip to content

Commit

Permalink
Rollup merge of rust-lang#78706 - bjorn3:fix_run_make_without_llvm, r…
Browse files Browse the repository at this point in the history
…=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.
  • Loading branch information
m-ou-se committed Nov 7, 2020
2 parents a6232fe + 39103ce commit e49c191
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions src/bootstrap/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1205,17 +1205,6 @@ note: if you're sure you want to do this, please open an issue as to why. In the
// Only pass correct values for these flags for the `run-make` suite as it
// requires that a C++ compiler was configured which isn't always the case.
if !builder.config.dry_run && matches!(suite, "run-make" | "run-make-fulldeps") {
cmd.arg("--cc")
.arg(builder.cc(target))
.arg("--cxx")
.arg(builder.cxx(target).unwrap())
.arg("--cflags")
.arg(builder.cflags(target, GitRepo::Rustc).join(" "));
copts_passed = true;
if let Some(ar) = builder.ar(target) {
cmd.arg("--ar").arg(ar);
}

// The llvm/bin directory contains many useful cross-platform
// tools. Pass the path to run-make tests so they can use them.
let llvm_bin_path = llvm_config
Expand All @@ -1241,6 +1230,21 @@ note: if you're sure you want to do this, please open an issue as to why. In the
}
}

// Only pass correct values for these flags for the `run-make` suite as it
// requires that a C++ compiler was configured which isn't always the case.
if !builder.config.dry_run && matches!(suite, "run-make" | "run-make-fulldeps") {
cmd.arg("--cc")
.arg(builder.cc(target))
.arg("--cxx")
.arg(builder.cxx(target).unwrap())
.arg("--cflags")
.arg(builder.cflags(target, GitRepo::Rustc).join(" "));
copts_passed = true;
if let Some(ar) = builder.ar(target) {
cmd.arg("--ar").arg(ar);
}
}

if !llvm_components_passed {
cmd.arg("--llvm-components").arg("");
}
Expand Down

0 comments on commit e49c191

Please sign in to comment.