Commit a9f11bf1 by Jamie Madill Committed by Commit Bot

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: 's avatarTobin Ehlis <tobine@google.com> Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com>
parent a48f95ab
...@@ -112,6 +112,15 @@ config("internal_config") { ...@@ -112,6 +112,15 @@ config("internal_config") {
} }
} }
config("constructor_and_destructor_warnings") {
if (is_clang) {
cflags = [
"-Wexit-time-destructors",
"-Wglobal-constructors",
]
}
}
config("extra_warnings") { config("extra_warnings") {
cflags = [] cflags = []
...@@ -128,10 +137,8 @@ config("extra_warnings") { ...@@ -128,10 +137,8 @@ config("extra_warnings") {
} }
if (is_clang) { if (is_clang) {
cflags += [ cflags += [
"-Wexit-time-destructors",
"-Wextra-semi-stmt", "-Wextra-semi-stmt",
"-Wfloat-conversion", "-Wfloat-conversion",
"-Wglobal-constructors",
"-Wnon-virtual-dtor", "-Wnon-virtual-dtor",
"-Wunneeded-internal-declaration", "-Wunneeded-internal-declaration",
......
...@@ -115,6 +115,7 @@ declare_args() { ...@@ -115,6 +115,7 @@ declare_args() {
angle_common_configs = [ angle_common_configs = [
angle_root + ":angle_release_asserts_config", angle_root + ":angle_release_asserts_config",
angle_root + ":better_linux_stack_traces", angle_root + ":better_linux_stack_traces",
angle_root + ":constructor_and_destructor_warnings",
angle_root + ":extra_warnings", angle_root + ":extra_warnings",
angle_root + ":internal_config", angle_root + ":internal_config",
] ]
...@@ -281,6 +282,7 @@ template("angle_test") { ...@@ -281,6 +282,7 @@ template("angle_test") {
configs += invoker.configs configs += invoker.configs
configs -= invoker.suppressed_configs configs -= invoker.suppressed_configs
configs -= [ angle_root + ":constructor_and_destructor_warnings" ]
configs -= [ angle_root + ":extra_warnings" ] configs -= [ angle_root + ":extra_warnings" ]
if (is_linux && !is_component_build) { if (is_linux && !is_component_build) {
......
...@@ -593,6 +593,7 @@ if (build_angle_deqp_tests && !is_fuchsia) { ...@@ -593,6 +593,7 @@ if (build_angle_deqp_tests && !is_fuchsia) {
"//build/config/compiler:chromium_code", "//build/config/compiler:chromium_code",
"//build/config/compiler:no_exceptions", "//build/config/compiler:no_exceptions",
"//build/config/compiler:no_rtti", "//build/config/compiler:no_rtti",
"${angle_root}:constructor_and_destructor_warnings",
"${angle_root}:extra_warnings", "${angle_root}:extra_warnings",
] ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment