Skip to content

Commit 1b9cd8b

Browse files
authored
Rollup merge of #87358 - jyn514:dry-run, r=Mark-Simulacrum
Fix `--dry-run` when download-ci-llvm is set Previously it would error out: ``` $ x check --dry-run thread 'main' panicked at 'std::fs::read_to_string(ci_llvm.join("link-type.txt")) failed with No such file or directory (os error 2) ("CI llvm missing: /home/joshua/rustc3/build/tmp-dry-run/x86_64-unknown-linux-gnu/ci-llvm")', src/bootstrap/config.rs:795:33 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace Build completed unsuccessfully in 0:00:10 ```
2 parents 3fc79fd + a02756c commit 1b9cd8b

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/bootstrap/config.rs

+10-2
Original file line numberDiff line numberDiff line change
@@ -792,8 +792,16 @@ impl Config {
792792

793793
// CI-built LLVM can be either dynamic or static.
794794
let ci_llvm = config.out.join(&*config.build.triple).join("ci-llvm");
795-
let link_type = t!(std::fs::read_to_string(ci_llvm.join("link-type.txt")));
796-
config.llvm_link_shared = link_type == "dynamic";
795+
config.llvm_link_shared = if config.dry_run {
796+
// just assume dynamic for now
797+
true
798+
} else {
799+
let link_type = t!(
800+
std::fs::read_to_string(ci_llvm.join("link-type.txt")),
801+
format!("CI llvm missing: {}", ci_llvm.display())
802+
);
803+
link_type == "dynamic"
804+
};
797805
}
798806

799807
if config.llvm_thin_lto {

0 commit comments

Comments
 (0)