Skip to content

Commit

Permalink
adding LLVM library link path to run-make
Browse files Browse the repository at this point in the history
When moving `coverage` tests from `run-make-fulldeps` to `run-make`,
some targets failed in CI with an obscure message:

failed to execute command: "musl-g++" "-ffunction-sections"
"-fdata-sections" "-fPIC" "-m32" "-march=i686" "-Wl,-melf_i386"
"-static" "-Wa,-mrelax-relocations=no" "-print-file-name=libstdc++.a"

error: No such file or directory (os error 2)

The coverage tests include `# needs-profiler-support` and these are the
first `run-make` tests to require it (as far as I can tell).

There is a special case in `bootstrap` for adding the LLVM library link
path, and it applies to `run-make-fulldeps`. This commit adds it for
`run-make` as well.
  • Loading branch information
richkadel committed May 7, 2021
1 parent 3e05c09 commit 4881fc7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bootstrap/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1399,7 +1399,7 @@ note: if you're sure you want to do this, please open an issue as to why. In the
// requirement, but the `-L` library path is not propagated across
// separate compilations. We can add LLVM's library path to the
// platform-specific environment variable as a workaround.
if !builder.config.dry_run && suite.ends_with("fulldeps") {
if !builder.config.dry_run && (suite == "ui-fulldeps" || mode == "run-make") {
let llvm_libdir = output(Command::new(&llvm_config).arg("--libdir"));
add_link_lib_path(vec![llvm_libdir.trim().into()], &mut cmd);
}
Expand Down

0 comments on commit 4881fc7

Please sign in to comment.