Update BUILD.gn

This commit is contained in:
Alexander David Frick 2022-08-02 02:52:11 -05:00 committed by GitHub
parent 736e7d43e3
commit 4d5e13bc5d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -375,7 +375,7 @@ config("compiler") {
if ((is_posix && !is_apple) || is_fuchsia) {
if (enable_profiling) {
if (!is_debug) {
cflags += [ "-g0" ]
cflags += [ "-g" ]
if (enable_full_stack_frames_for_profiling) {
cflags += [
@ -421,7 +421,7 @@ config("compiler") {
}
}
}
# Apple compiler flags setup.
# ---------------------------------
if (is_apple) {
@ -909,8 +909,8 @@ config("compiler_cpu_abi") {
} else if (current_cpu == "arm") {
if (is_clang && !is_android && !is_nacl &&
!(is_chromeos_lacros && is_chromeos_device)) {
cflags += [ "--target=arm-linux-gnueabihf", "-O3", ]
ldflags += [ "--target=arm-linux-gnueabihf", "-Wl,-O3", ]
cflags += [ "--target=arm-linux-gnueabihf", "-O3", "-Wno-unused-command-line-argument", ]
ldflags += [ "--target=arm-linux-gnueabihf", "-Wl,-O3", "-Wno-unused-command-line-argument", ]
}
if (!is_nacl) {
cflags += [
@ -925,7 +925,7 @@ config("compiler_cpu_abi") {
if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
!(is_chromeos_lacros && is_chromeos_device)) {
cflags += [ "--target=aarch64-linux-gnu", "-O3", "-Wno-error", "-Wno-unused-command-line-argument", ]
ldflags += [ "--target=aarch64-linux-gnu", "-Wl,-O3", ]
ldflags += [ "--target=aarch64-linux-gnu", "-Wl,-O3", "-Wno-unused-command-line-argument", ]
}
if (is_android) {
# Outline atomics crash on Exynos 9810. http://crbug.com/1272795
@ -937,10 +937,10 @@ config("compiler_cpu_abi") {
if (custom_toolchain == "") {
if (is_clang) {
if (is_android) {
cflags += [ "--target=mipsel-linux-android" ]
cflags += [ "--target=mipsel-linux-android", "-O3", ]
ldflags += [ "--target=mipsel-linux-android" ]
} else {
cflags += [ "--target=mipsel-linux-gnu" ]
cflags += [ "--target=mipsel-linux-gnu", "-O3", ]
ldflags += [ "--target=mipsel-linux-gnu" ]
}
} else {
@ -1541,7 +1541,7 @@ config("default_warnings") {
# TODO(thakis): Only for no_chromium_code? http://crbug.com/912662
"-Wno-ignored-pragma-optimize",
]
if (!is_nacl) {
cflags += [
# TODO(https://crbug.com/1300731) Clean up and enable.
@ -2318,7 +2318,7 @@ config("symbols") {
cflags += [ "-gcodeview-ghash" ]
ldflags = [ "/DEBUG:GHASH" ]
} else {
ldflags = [ "/DEBUG:NONE" ]
ldflags = [ "/DEBUG" ]
}
# All configs using /DEBUG should include this:
@ -2352,7 +2352,7 @@ config("symbols") {
# flag, so we can use use -g1 for pnacl and nacl-clang compiles.
# gcc nacl is is_nacl && !is_clang, pnacl and nacl-clang are && is_clang.
if ((!is_nacl || is_clang) && current_os != "zos") {
cflags += [ "-g0" ]
cflags += [ "-g2" ]
}
if (!is_nacl && is_clang && !is_tsan && !is_asan) {
@ -2369,7 +2369,7 @@ config("symbols") {
}
if (is_apple) {
swiftflags = [ "-g0" ]
swiftflags = [ "-g" ]
}
if (use_debug_fission) {
@ -2425,7 +2425,7 @@ config("symbols") {
]
}
}
rustflags = [ "-g0", "-Copt-level=3" ]
rustflags = [ "-g", "-Copt-level=3" ]
}
# Minimal symbols.
@ -2440,7 +2440,7 @@ config("minimal_symbols") {
cflags += [ "-gcodeview-ghash" ]
ldflags = [ "/DEBUG:GHASH" ]
} else {
ldflags = [ "/DEBUG:NONE" ]
ldflags = [ "/DEBUG" ]
}
# All configs using /DEBUG should include this:
@ -2450,7 +2450,7 @@ config("minimal_symbols") {
if (is_clang) {
# -gline-tables-only is the same as -g1, but clang-cl only exposes the
# former.
cflags += [ "-g0" ]
cflags += [ "-gline-tables-only" ]
}
} else {
cflags = []
@ -2476,7 +2476,7 @@ config("minimal_symbols") {
# flag, so we can use use -g1 for pnacl and nacl-clang compiles.
# gcc nacl is is_nacl && !is_clang, pnacl and nacl-clang are && is_clang.
if (!is_nacl || is_clang) {
cflags += [ "-g0" ]
cflags += [ "-g1" ]
}
if (!is_nacl && is_clang && !is_tsan && !is_asan) {