Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Unified Diff: build/config/nacl/BUILD.gn

Issue 1404343004: GN: Suppress MSVC "const should be initialized" warning in NaCl code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/nacl/BUILD.gn
diff --git a/build/config/nacl/BUILD.gn b/build/config/nacl/BUILD.gn
index 84ffc62c6686d328f185e9cf52ce3a9773283718..217494fb1ba5aeb1cbe1ddd0d16b31f56dc40dbc 100644
--- a/build/config/nacl/BUILD.gn
+++ b/build/config/nacl/BUILD.gn
@@ -25,13 +25,28 @@ config("nexe_defines") {
]
}
+config("nacl_warnings") {
+ if (is_win) {
+ # Some NaCl code uses forward declarations of static const variables,
+ # with initialized definitions later on. (The alternative would be
+ # many, many more forward declarations of everything used in that
+ # const variable's initializer before the definition.) The Windows
+ # compiler is too stupid to notice that there is an initializer later
+ # in the file, and warns about the forward declaration.
+ cflags = [ "/wd4132" ]
+ }
+}
+
# The base target that all targets in the NaCl build should depend on.
# This allows configs to be modified for everything in the NaCl build, even when
# the NaCl build is composed into the Chrome build. (GN has no functionality to
-# add flags to everythin in //native_client, having a base target works around
+# add flags to everything in //native_client, having a base target works around
# that limitation.)
source_set("nacl_base") {
- public_configs = [ ":nacl_defines" ]
+ public_configs = [
+ ":nacl_defines",
+ ":nacl_warnings",
+ ]
if (current_os == "nacl") {
public_configs += [ ":nexe_defines" ]
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698