Skip to content

Commit

Permalink
Fix Build::is_flag_supported: Check exit status of the compiler (#757)
Browse files Browse the repository at this point in the history
  • Loading branch information
NobodyXu authored Jan 24, 2023
1 parent 3f77322 commit d69bc7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ impl Build {
cmd.arg(&src);

let output = cmd.output()?;
let is_supported = output.stderr.is_empty();
let is_supported = output.status.success() && output.stderr.is_empty();

known_status.insert(flag.to_owned(), is_supported);
Ok(is_supported)
Expand Down

0 comments on commit d69bc7d

Please sign in to comment.