about summary refs log tree commit diff
path: root/src/bootstrap/util.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-12-12 19:52:27 +0000
committerbors <bors@rust-lang.org>2019-12-12 19:52:27 +0000
commit3eeb8d4f2fbae0bb1c587d00b5abeaf938da47f4 (patch)
treeb34847e50618034373a8cea277b59839733e96da /src/bootstrap/util.rs
parente9469a6aec2f49fa1e2ae670649f293866932253 (diff)
parent786b9d0d626dfbf97e64cd113bbcca08f65c3ca9 (diff)
Auto merge of #67172 - jethrogb:jb/bootstrap-linker, r=alexcrichton
Bootstrap: change logic for choosing linker and rpath

This is a follow-up from #66957 and #67023. Apparently there was one more location with a hard-coded list of targets to influence linking.

I've filed #67171 to track this madness.

r? @alexcrichton
Diffstat (limited to 'src/bootstrap/util.rs')
-rw-r--r--src/bootstrap/util.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/bootstrap/util.rs b/src/bootstrap/util.rs
index 6f8a6308745..6824b7a58c4 100644
--- a/src/bootstrap/util.rs
+++ b/src/bootstrap/util.rs
@@ -15,6 +15,7 @@ use build_helper::t;
 
 use crate::config::Config;
 use crate::builder::Builder;
+use crate::cache::Interned;
 
 /// Returns the `name` as the filename of a static library for `target`.
 pub fn staticlib(name: &str, target: &str) -> String {
@@ -306,3 +307,15 @@ pub fn forcing_clang_based_tests() -> bool {
         false
     }
 }
+
+pub fn use_host_linker(target: &Interned<String>) -> bool {
+    // FIXME: this information should be gotten by checking the linker flavor
+    // of the rustc target
+    !(
+        target.contains("emscripten") ||
+        target.contains("wasm32") ||
+        target.contains("nvptx") ||
+        target.contains("fortanix") ||
+        target.contains("fuchsia")
+    )
+}