about summary refs log tree commit diff
path: root/src/bootstrap/util.rs
diff options
context:
space:
mode:
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")
+    )
+}