Skip to content

Commit

Permalink
[rustbuild] fix cross compilation of std for mips(el)-linux-musl
Browse files Browse the repository at this point in the history
These targets don't link statically to libunwind or libc
  • Loading branch information
Jorge Aparicio committed Mar 3, 2016
1 parent f6e125f commit ddd2e99
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/bootstrap/build/sanity.rs
Expand Up @@ -79,7 +79,7 @@ pub fn check(build: &mut Build) {
}

// Make sure musl-root is valid if specified
if target.contains("musl") {
if target.contains("musl") && target.contains("x86_64") {
match build.config.musl_root {
Some(ref root) => {
if fs::metadata(root.join("lib/libc.a")).is_err() {
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/build.rs
Expand Up @@ -28,7 +28,7 @@ fn main() {
}

if target.contains("unknown-linux") {
if target.contains("musl") {
if target.contains("musl") && target.contains("x86_64") {
println!("cargo:rustc-link-lib=static=unwind");
} else {
println!("cargo:rustc-link-lib=dl");
Expand Down

0 comments on commit ddd2e99

Please sign in to comment.