Update BUILD.gn

This commit is contained in:
Alexander David Frick 2022-05-26 13:21:50 -05:00 committed by GitHub
parent f075ecc22f
commit 9330b2ee09
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -682,9 +682,11 @@ config("compiler") {
# of "all" which means number of hardware threads) is faster.
ldflags += [ "-Wl,--thinlto-jobs=all" ]
if (is_apple) {
ldflags +=
[ "-Wl,-cache_path_lto," +
rebase_path("$root_out_dir/thinlto-cache", root_build_dir) ]
ldflags += [
"-Wl,-cache_path_lto," +
rebase_path("$root_out_dir/thinlto-cache", root_build_dir),
"-Wcrl,object_path_lto",
]
} else {
ldflags +=
[]
@ -1538,6 +1540,15 @@ config("default_warnings") {
cflags += [ "-Wno-unqualified-std-cast-call" ]
}
if (!is_nacl && !(is_chromeos ||
default_toolchain == "//build/toolchain/cros:target")) {
# TODO(https://crbug.com/1322823): Remove flags once potential miscompile is investigated.
cflags += [
"-Xclang",
"-no-opaque-pointers",
]
}
if (is_fuchsia) {
# TODO(https://bugs.chromium.org/p/fuchsia/issues/detail?id=77383)
cflags += [ "-Wno-deprecated-copy" ]