Skip to content

Commit

Permalink
Auto merge of #88364 - pietroalbini:llvm-install-filecheck, r=Mark-Si…
Browse files Browse the repository at this point in the history
…mulacrum

Make sure FileCheck is copied in the LLVM output directory

The tool, which is needed by parts of our test suite, is built as part of LLVM but is *not* copied to the directory containing the output LLVM binaries. This adds a flag to ensure the binary is copied. This shouldn't add any extra built time, as the flag just installs extra binaries that were already compiled.

This is not strictly needed for the test suite to work (as it also checks `build/$target/llvm/build/bin` for the binary), but it allows deleting the `build/$TARGET/llvm/build` directory (which also contains the intermediary build artifacts) without affecting the test suite, saving disk space.
  • Loading branch information
bors committed Sep 4, 2021
2 parents b89e01c + 9df6307 commit 5d2a410
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/bootstrap/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,11 @@ impl Step for Llvm {
.define("LLVM_TARGET_ARCH", target_native.split('-').next().unwrap())
.define("LLVM_DEFAULT_TARGET_TRIPLE", target_native);

// Parts of our test suite rely on the `FileCheck` tool, which is built by default in
// `build/$TARGET/llvm/build/bin` is but *not* then installed to `build/$TARGET/llvm/bin`.
// This flag makes sure `FileCheck` is copied in the final binaries directory.
cfg.define("LLVM_INSTALL_UTILS", "ON");

if builder.config.llvm_profile_generate {
cfg.define("LLVM_BUILD_INSTRUMENTED", "IR");
cfg.define("LLVM_BUILD_RUNTIME", "No");
Expand Down

0 comments on commit 5d2a410

Please sign in to comment.