Update BUILD.gn

This commit is contained in:
Alexander David Frick 2022-09-20 00:06:26 -05:00 committed by GitHub
parent ac92dc3461
commit 401b76d0f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1675,6 +1675,9 @@ config("chromium_code") {
# Warn on missing break statements at the end of switch cases.
# For intentional fallthrough, use [[fallthrough]].
"-Wimplicit-fallthrough",
# Warn on unnecessary extra semicolons outside of function definitions.
"-Wextra-semi",
]
# TODO(thakis): Enable this more often, https://crbug.com/346399
@ -1691,11 +1694,6 @@ config("chromium_code") {
"-Wthread-safety",
]
}
# TODO(https://crbug.com/1355871): Enable on more platforms.
if (is_win || is_mac || is_linux || is_chromeos) {
cflags += [ "-Wextra-semi" ]
}
}
configs = [
@ -2247,8 +2245,9 @@ if (is_clang && is_a_target_toolchain) {
_clang_sample_profile = "//chrome/android/profiles/afdo.prof"
} else {
assert(chromeos_afdo_platform == "atom" ||
chromeos_afdo_platform == "bigcore",
"Only atom and bigcore are valid Chrome OS profiles.")
chromeos_afdo_platform == "bigcore" ||
chromeos_afdo_platform == "arm",
"Only atom, bigcore and arm are valid Chrome OS profiles.")
_clang_sample_profile =
"//chromeos/profiles/${chromeos_afdo_platform}.afdo.prof"
}
@ -2425,6 +2424,14 @@ config("symbols") {
}
}
configs = []
# Compress debug on 32-bit ARM to stay under 4GB for ChromeOS
# https://b/243982712.
if (symbol_level == 2 && is_chromeos_device && !use_debug_fission &&
!is_nacl && current_cpu == "arm") {
configs += [ "//build/config:compress_debug_sections" ]
}
if (is_clang && (!is_nacl || is_nacl_saigo) && current_os != "zos") {
if (is_apple) {
# TODO(https://crbug.com/1050118): Investigate missing debug info on mac.