Skip to content

Commit

Permalink
Make user-specified cflags take precedence over cc-rs flags
Browse files Browse the repository at this point in the history
  • Loading branch information
madsmtm committed Jan 27, 2025
1 parent 94da9de commit 4e9ce56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -726,14 +726,14 @@ impl Config {
let mut flagsflag = OsString::from("-D");
flagsflag.push(&flag_var);
flagsflag.push("=");
flagsflag.push(extra);
for arg in compiler.args() {
if skip_arg(arg) {
continue;
}
flagsflag.push(" ");
flagsflag.push(arg);
flagsflag.push(" ");
}
flagsflag.push(extra);
cmd.arg(flagsflag);
}

Expand Down

0 comments on commit 4e9ce56

Please sign in to comment.