Skip to content

Commit d69bc7d

Browse files
authored
Fix Build::is_flag_supported: Check exit status of the compiler (#757)
1 parent 3f77322 commit d69bc7d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ impl Build {
540540
cmd.arg(&src);
541541

542542
let output = cmd.output()?;
543-
let is_supported = output.stderr.is_empty();
543+
let is_supported = output.status.success() && output.stderr.is_empty();
544544

545545
known_status.insert(flag.to_owned(), is_supported);
546546
Ok(is_supported)

0 commit comments

Comments
 (0)