diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-09-17 19:27:05 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-17 19:27:05 +0200 |
| commit | ec6104784dc24224f93cf26e68f15585f695eae9 (patch) | |
| tree | b141721a97bcd8467bd1ee4f189e197f7a512261 /src/bootstrap | |
| parent | 00d88bdb2c59c4d40add0aa36ba1013d06afd32f (diff) | |
| parent | 999502978612be1379240f792614f8580e49d123 (diff) | |
| download | rust-ec6104784dc24224f93cf26e68f15585f695eae9.tar.gz rust-ec6104784dc24224f93cf26e68f15585f695eae9.zip | |
Rollup merge of #101781 - chriswailes:dynamic-llvm-on-musl, r=jyn514
Extend list of targets that support dyanmic linking for llvm tools This commit adds `linux-musl` to the list of targets that support dynamic linking for the LLVM tools.
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/lib.rs | 4 | ||||
| -rw-r--r-- | src/bootstrap/native.rs | 9 |
2 files changed, 2 insertions, 11 deletions
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index cc0cf12bd18..fade44ecb15 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -1307,10 +1307,6 @@ impl Build { self.package_vers(&self.version) } - fn llvm_link_tools_dynamically(&self, target: TargetSelection) -> bool { - target.contains("linux-gnu") || target.contains("apple-darwin") - } - /// Returns the `version` string associated with this compiler for Rust /// itself. /// diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs index 62b56994afe..d6ee6d489cf 100644 --- a/src/bootstrap/native.rs +++ b/src/bootstrap/native.rs @@ -423,12 +423,7 @@ impl Step for Llvm { // which saves both memory during parallel links and overall disk space // for the tools. We don't do this on every platform as it doesn't work // equally well everywhere. - // - // If we're not linking rustc to a dynamic LLVM, though, then don't link - // tools to it. - let llvm_link_shared = - builder.llvm_link_tools_dynamically(target) && builder.llvm_link_shared(); - if llvm_link_shared { + if builder.llvm_link_shared() { cfg.define("LLVM_LINK_LLVM_DYLIB", "ON"); } @@ -553,7 +548,7 @@ impl Step for Llvm { // libLLVM.dylib will be built. However, llvm-config will still look // for a versioned path like libLLVM-14.dylib. Manually create a symbolic // link to make llvm-config happy. - if llvm_link_shared && target.contains("apple-darwin") { + if builder.llvm_link_shared() && target.contains("apple-darwin") { let mut cmd = Command::new(&build_llvm_config); let version = output(cmd.arg("--version")); let major = version.split('.').next().unwrap(); |
