diff options
Diffstat (limited to 'src/bootstrap/bin/rustc.rs')
| -rw-r--r-- | src/bootstrap/bin/rustc.rs | 10 |
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. |
