Update BUILD.gn

This commit is contained in:
Alexander David Frick 2022-05-30 17:39:03 -05:00 committed by GitHub
parent 32768dcfca
commit d451312686
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1585,22 +1585,21 @@ config("default_warnings") {
# configs += [ "//build/config/compiler:prevent_unsafe_narrowing" ]
config("prevent_unsafe_narrowing") {
# TODO(crbug.com/1292951): Enable this config
# if (is_clang) {
# cflags = [
# "-Wshorten-64-to-32",
# "-Wimplicit-int-conversion",
# "-Wsign-compare",
# "-Wsign-conversion",
# ]
# if (!is_nacl) {
# cflags += [
# # Avoid bugs of the form `if (size_t i = size; i >= 0; --i)` while
# # fixing types to be sign-correct.
# "-Wtautological-unsigned-zero-compare",
# ]
# }
# }
if (is_clang) {
cflags = [
"-Wshorten-64-to-32",
"-Wimplicit-int-conversion",
"-Wsign-compare",
"-Wsign-conversion",
]
if (!is_nacl) {
cflags += [
# Avoid bugs of the form `if (size_t i = size; i >= 0; --i)` while
# fixing types to be sign-correct.
"-Wtautological-unsigned-zero-compare",
]
}
}
}
# chromium_code ---------------------------------------------------------------