summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorEduard-Mihai Burtescu <edy.burt@gmail.com>2018-11-25 14:08:06 +0200
committerEduard-Mihai Burtescu <edy.burt@gmail.com>2018-11-30 06:15:20 +0200
commiteb2c71cdf2d154a217e155d96474f4988e04a253 (patch)
tree813446a317308fcda3fa39bca21e22e29cfd0204 /src/bootstrap
parentf083c32da7b74154611af6e2153f3ca2b28782e0 (diff)
downloadrust-eb2c71cdf2d154a217e155d96474f4988e04a253.tar.gz
rust-eb2c71cdf2d154a217e155d96474f4988e04a253.zip
bootstrap: don't use libraries from MUSL_ROOT on non-musl targets.
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/bin/rustc.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs
index afe1b4c42ea..d18a48e5d22 100644
--- a/src/bootstrap/bin/rustc.rs
+++ b/src/bootstrap/bin/rustc.rs
@@ -129,10 +129,12 @@ fn main() {
         // Help the libc crate compile by assisting it in finding the MUSL
         // native libraries.
         if let Some(s) = env::var_os("MUSL_ROOT") {
-            let mut root = OsString::from("native=");
-            root.push(&s);
-            root.push("/lib");
-            cmd.arg("-L").arg(&root);
+            if target.contains("musl") {
+                let mut root = OsString::from("native=");
+                root.push(&s);
+                root.push("/lib");
+                cmd.arg("-L").arg(&root);
+            }
         }
 
         // Override linker if necessary.