Skip to content

Commit a8b9a57

Browse files
committed
bootstrap: relax compiler-rt root assertion
Not needed during tests.
1 parent e2c96cc commit a8b9a57

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/bootstrap/src/core/build_steps/compile.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,12 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, cargo: &mut Car
590590
),
591591
);
592592
let compiler_builtins_root = builder.src.join("src/llvm-project/compiler-rt");
593-
assert!(compiler_builtins_root.exists());
593+
if !builder.config.dry_run() {
594+
// This assertion would otherwise trigger during tests if `llvm-project` is not
595+
// checked out.
596+
assert!(compiler_builtins_root.exists());
597+
}
598+
594599
// The path to `compiler-rt` is also used by `profiler_builtins` (above),
595600
// so if you're changing something here please also change that as appropriate.
596601
cargo.env("RUST_COMPILER_RT_ROOT", &compiler_builtins_root);

0 commit comments

Comments
 (0)