diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2021-01-31 15:05:00 +0100 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2021-01-31 15:05:00 +0100 |
| commit | 1fe1fa9122b8ea0cac7e7e92be798a44cc89831c (patch) | |
| tree | 6dc0d102dd83b2386c579e33e8c4363df250fc01 /src | |
| parent | 0e63af5da3400ace48a0345117980473fd21ad73 (diff) | |
| download | rust-1fe1fa9122b8ea0cac7e7e92be798a44cc89831c.tar.gz rust-1fe1fa9122b8ea0cac7e7e92be798a44cc89831c.zip | |
Avoid building LLVM just for llvm-dwp
When the LLVM backend is disabled, the llvm-project submodule is not checked out by default. This breaks the bootstrap test for cg_clif. As cg_clif doesn't support split debuginfo anyway llvm-dwp is not necessary. Other backends would likely not want to build LLVM just for llvm-dwp either.
Diffstat (limited to 'src')
| -rw-r--r-- | src/bootstrap/compile.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index 39700c087a2..34002019a6f 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -1050,8 +1050,10 @@ impl Step for Assemble { builder.copy(&lld_install.join("bin").join(&src_exe), &libdir_bin.join(&dst_exe)); } - // Similarly, copy `llvm-dwp` into libdir for Split DWARF. - { + // Similarly, copy `llvm-dwp` into libdir for Split DWARF. Only copy it when the LLVM + // backend is used to avoid unnecessarily building LLVM and because LLVM is not checked + // out by default when the LLVM backend is not enabled. + if builder.config.rust_codegen_backends.contains(&INTERNER.intern_str("llvm")) { let src_exe = exe("llvm-dwp", target_compiler.host); let dst_exe = exe("rust-llvm-dwp", target_compiler.host); let llvm_config_bin = builder.ensure(native::Llvm { target: target_compiler.host }); |
