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. 5
      src/lib.rs

5
src/lib.rs

@ -1106,9 +1106,12 @@ impl Build {
cmd.args.push("-m64".into());
}
if self.static_flag.is_none() && target.contains("musl") {
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
if target.starts_with("armv7-") && target.contains("-linux-") {

Loading…
Cancel
Save