GN: Separate out constructor/destructor warnings.

This will allow for the capture/replay sample to disable the warnings.
We'd like to keep them enabled for most of ANGLE code.

Bug: angleproject:3611
Change-Id: I3cc7af26fa54c03cc5b79727e7b403a1b218a903
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1869544
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tobin Ehlis <tobine@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
This commit is contained in:
Jamie Madill 2019-10-21 08:39:14 -04:00 коммит произвёл Commit Bot
Родитель a48f95abef
Коммит a9f11bf14b
3 изменённых файлов: 12 добавлений и 2 удалений

Просмотреть файл

@ -112,6 +112,15 @@ config("internal_config") {
}
}
config("constructor_and_destructor_warnings") {
if (is_clang) {
cflags = [
"-Wexit-time-destructors",
"-Wglobal-constructors",
]
}
}
config("extra_warnings") {
cflags = []
@ -128,10 +137,8 @@ config("extra_warnings") {
}
if (is_clang) {
cflags += [
"-Wexit-time-destructors",
"-Wextra-semi-stmt",
"-Wfloat-conversion",
"-Wglobal-constructors",
"-Wnon-virtual-dtor",
"-Wunneeded-internal-declaration",

Просмотреть файл

@ -115,6 +115,7 @@ declare_args() {
angle_common_configs = [
angle_root + ":angle_release_asserts_config",
angle_root + ":better_linux_stack_traces",
angle_root + ":constructor_and_destructor_warnings",
angle_root + ":extra_warnings",
angle_root + ":internal_config",
]
@ -281,6 +282,7 @@ template("angle_test") {
configs += invoker.configs
configs -= invoker.suppressed_configs
configs -= [ angle_root + ":constructor_and_destructor_warnings" ]
configs -= [ angle_root + ":extra_warnings" ]
if (is_linux && !is_component_build) {

Просмотреть файл

@ -593,6 +593,7 @@ if (build_angle_deqp_tests && !is_fuchsia) {
"//build/config/compiler:chromium_code",
"//build/config/compiler:no_exceptions",
"//build/config/compiler:no_rtti",
"${angle_root}:constructor_and_destructor_warnings",
"${angle_root}:extra_warnings",
]