提交 a02756c1 编写于 作者: J Joshua Nelson

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
```
上级 32c9b7b0
...@@ -792,8 +792,16 @@ pub fn parse(args: &[String]) -> Config { ...@@ -792,8 +792,16 @@ pub fn parse(args: &[String]) -> Config {
// CI-built LLVM can be either dynamic or static. // CI-built LLVM can be either dynamic or static.
let ci_llvm = config.out.join(&*config.build.triple).join("ci-llvm"); let ci_llvm = config.out.join(&*config.build.triple).join("ci-llvm");
let link_type = t!(std::fs::read_to_string(ci_llvm.join("link-type.txt"))); config.llvm_link_shared = if config.dry_run {
config.llvm_link_shared = link_type == "dynamic"; // just assume dynamic for now
true
} else {
let link_type = t!(
std::fs::read_to_string(ci_llvm.join("link-type.txt")),
format!("CI llvm missing: {}", ci_llvm.display())
);
link_type == "dynamic"
};
} }
if config.llvm_thin_lto { if config.llvm_thin_lto {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册