Skip to content

Commit

Permalink
build.rs: Use cc-rs's built-in logic for warnings-as-errors.
Browse files Browse the repository at this point in the history
Take a step towards supporting Clang as the compiler for -msvc targets.
  • Loading branch information
briansmith committed Aug 13, 2021
1 parent 56561bc commit b21ccc9
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -614,12 +614,7 @@ fn cc(
}

if warnings_are_errors {
let flag = if &target.env != "msvc" {
"-Werror"
} else {
"/WX"
};
let _ = c.flag(flag);
c.warnings_into_errors(true);
}
if is_musl {
// Some platforms enable _FORTIFY_SOURCE by default, but musl
Expand Down

0 comments on commit b21ccc9

Please sign in to comment.