Update BUILD.gn
This commit is contained in:
parent
cd151d8c95
commit
59d8080148
1 changed files with 23 additions and 15 deletions
|
@ -835,7 +835,7 @@ config("compiler") {
|
|||
rustflags += [ "-Cembed-bitcode=no" ]
|
||||
}
|
||||
if (is_official_build) {
|
||||
rustflags += [ "-Ccodegen-units=1", "-Copt-level=3", "-Ctarget-feature=+sse4,+aes,+avx", ]
|
||||
rustflags += [ "-Ccodegen-units=1", "-Copt-level=3", "-Ctarget-feature=+aes,+avx", ]
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -901,8 +901,9 @@ config("compiler_cpu_abi") {
|
|||
"-O3",
|
||||
"-mavx",
|
||||
"-maes",
|
||||
"-mvaes",
|
||||
]
|
||||
ldflags += [ "-m64", "-Wl,-O3", "-mavx", "-maes", "-Wl,-mllvm,-import-instr-limit=30", "-Wl,-mllvm,-import-hot-multiplier=15", "-Wl,-mllvm,-import-cold-multiplier=4", ]
|
||||
ldflags += [ "-m64", "-Wl,-O3", "-mavx", "-maes", "-mvaes", "-Wl,-mllvm,-import-instr-limit=30", "-Wl,-mllvm,-import-hot-multiplier=15", "-Wl,-mllvm,-import-cold-multiplier=4", ]
|
||||
} else if (current_cpu == "x86") {
|
||||
cflags += [ "-m32" ]
|
||||
ldflags += [ "-m32" ]
|
||||
|
@ -1667,6 +1668,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
|
||||
|
@ -1683,11 +1687,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 = [
|
||||
|
@ -2183,9 +2182,9 @@ config("optimize") {
|
|||
cflags = [ "-O3" ] + common_optimize_on_cflags
|
||||
}
|
||||
if (optimize_for_size) {
|
||||
rustflags = [ "-Copt-level=3", "-Ctarget-feature=+sse4,+aes,+avx", ]
|
||||
rustflags = [ "-Copt-level=3", "-Ctarget-feature=+aes,+avx", ]
|
||||
} else {
|
||||
rustflags = [ "-Copt-level=3", "-Ctarget-feature=+sse4,+aes,+avx", ]
|
||||
rustflags = [ "-Copt-level=3", "-Ctarget-feature=+aes,+avx", ]
|
||||
}
|
||||
ldflags = common_optimize_on_ldflags
|
||||
}
|
||||
|
@ -2253,7 +2252,7 @@ config("optimize_max") {
|
|||
} else {
|
||||
cflags = [ "-O3" ] + common_optimize_on_cflags
|
||||
}
|
||||
rustflags = [ "-Copt-level=3", "-Ctarget-feature=+sse4,+aes,+avx", ]
|
||||
rustflags = [ "-Copt-level=3", "-Ctarget-feature=+aes,+avx", ]
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2286,7 +2285,7 @@ config("optimize_speed") {
|
|||
} else {
|
||||
cflags = [ "-O3" ] + common_optimize_on_cflags
|
||||
}
|
||||
rustflags = [ "-Copt-level=3", "-Ctarget-feature=+sse4,+aes,+avx", ]
|
||||
rustflags = [ "-Copt-level=3", "-Ctarget-feature=+aes,+avx", ]
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2333,8 +2332,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"
|
||||
}
|
||||
|
@ -2511,6 +2511,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.
|
||||
|
@ -2528,7 +2536,7 @@ config("symbols") {
|
|||
]
|
||||
}
|
||||
}
|
||||
rustflags = [ "-g", "-Copt-level=3", "-Ctarget-feature=+sse4,+aes,+avx", ]
|
||||
rustflags = [ "-g", "-Copt-level=3", "-Ctarget-feature=+aes,+avx", ]
|
||||
}
|
||||
|
||||
# Minimal symbols.
|
||||
|
@ -2600,7 +2608,7 @@ config("minimal_symbols") {
|
|||
|
||||
asmflags = cflags
|
||||
}
|
||||
rustflags = [ "-Cdebuginfo=1", "-Copt-level=3", "-Ctarget-feature=+sse4,+aes,+avx", ]
|
||||
rustflags = [ "-Cdebuginfo=1", "-Copt-level=3", "-Ctarget-feature=+aes,+avx", ]
|
||||
}
|
||||
|
||||
# This configuration contains function names only. That is, the compiler is
|
||||
|
|
Loading…
Reference in a new issue