Browse Source

Merge pull request #307 from mixi/master

Pass -static depending on crt-static on linux too.
cl-test
Alex Crichton 7 years ago
committed by GitHub
parent
commit
a2c478feba
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      src/lib.rs

7
src/lib.rs

@ -1106,8 +1106,11 @@ impl Build {
cmd.args.push("-m64".into());
}
if self.static_flag.is_none() && target.contains("musl") {
cmd.args.push("-static".into());
if self.static_flag.is_none() {
let features = env::var("CARGO_CFG_TARGET_FEATURE").unwrap_or(String::new());
if features.contains("crt-static") {
cmd.args.push("-static".into());
}
}
// armv7 targets get to use armv7 instructions

Loading…
Cancel
Save