Skip to content

Commit 0d3e4d1

Browse files
Rollup merge of #147376 - jieyouxu:bootstrap-compiler-rt-self-test, r=Kobzol
bootstrap: relax `compiler-rt` root assertion Not needed during tests. This would otherwise require `src/llvm-project` submodule to be initialized and `compiler-rt/` subdirectory to be present. I need this and #147374 to get bootstrap self-tests to pass with no git submodules checked out locally. r? `@Kobzol` (or bootstrap)
2 parents aa37ad4 + a8b9a57 commit 0d3e4d1

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)