Skip to content

Commit 6dec76f

Browse files
committed
Auto merge of #143474 - jieyouxu:bootstrap-llvm-snapshot, r=Kobzol
Pretend in bootstrap snapshot tests that we always build in-tree LLVM Otherwise, depending on whether CI LLVM is inhibited or if an externally-provided LLVM is used, bootstrap host LLVM build step could be missing in step snapshots. Note that I'm not sure if this is the *right* solution (this might be *a* solution). I imagine we do want to control for the set of configuration that these snapshot tests are run, as much as possible. r? `@Kobzol`
2 parents fd9ca71 + 006e97a commit 6dec76f

File tree

1 file changed

+8
-0
lines changed
  • src/bootstrap/src/utils/tests

1 file changed

+8
-0
lines changed

src/bootstrap/src/utils/tests/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use tempfile::TempDir;
77

88
use crate::core::builder::Builder;
99
use crate::core::config::DryRun;
10+
use crate::utils::helpers::get_host_target;
1011
use crate::{Build, Config, Flags, t};
1112

1213
pub mod git;
@@ -91,6 +92,13 @@ impl ConfigBuilder {
9192
self.args.push("--set".to_string());
9293
self.args.push("build.submodules=false".to_string());
9394

95+
// Override any external LLVM set and inhibit CI LLVM; pretend that we're always building
96+
// in-tree LLVM from sources.
97+
self.args.push("--set".to_string());
98+
self.args.push("llvm.download-ci-llvm=false".to_string());
99+
self.args.push("--set".to_string());
100+
self.args.push(format!("target.'{}'.llvm-config=false", get_host_target()));
101+
94102
// Do not mess with the local rustc checkout build directory
95103
self.args.push("--build-dir".to_string());
96104
self.args.push(self.directory.join("build").display().to_string());

0 commit comments

Comments
 (0)