Skip to content

Commit

Permalink
Stop setting -static if crt-static is used in gcc
Browse files Browse the repository at this point in the history
Fixed #1074
  • Loading branch information
NobodyXu authored Jun 2, 2024
1 parent 3ba2356 commit 39355ca
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2167,14 +2167,6 @@ impl Build {
cmd.args.push("-finput-charset=utf-8".into());
}

if self.static_flag.is_none() {
let features = self.getenv("CARGO_CFG_TARGET_FEATURE");
let features = features.as_deref().unwrap_or_default();
if features.contains("crt-static") {
cmd.args.push("-static".into());
}
}

// armv7 targets get to use armv7 instructions
if (target.starts_with("armv7") || target.starts_with("thumbv7"))
&& (target.contains("-linux-") || target.contains("-kmc-solid_"))
Expand Down

0 comments on commit 39355ca

Please sign in to comment.