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

Unified Diff: Source/BUILD.gn

Issue 318503002: GN: Make wtf_unittests build on mac/clang (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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 | Source/platform/BUILD.gn » ('j') | Source/wtf/BUILD.gn » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/BUILD.gn
diff --git a/Source/BUILD.gn b/Source/BUILD.gn
index 8911897298f3823ec21beda579ed3087688f05e8..a6d3ac88ba1cc071aa8b49a5af7bf42c0df58c2a 100644
--- a/Source/BUILD.gn
+++ b/Source/BUILD.gn
@@ -30,6 +30,8 @@ config("config") {
cflags = []
defines = []
+ configs = [ ":non_test_config" ]
+
if (is_win) {
cflags += [
"/wd4305", # Truncation from 'type1' to 'type2'.
@@ -60,7 +62,6 @@ config("config") {
}
if (is_clang) {
- cflags += [ "-Wglobal-constructors" ]
if (blink_gc_plugin && clang_use_chrome_plugins) {
# TODO(GYP)
#'cflags': ['<!@(../../../tools/clang/scripts/blink_gc_plugin_flags.sh enable-oilpan=<(enable_oilpan) dump-graph=<(blink_gc_plugin_dump_graph))'],
@@ -68,6 +69,17 @@ config("config") {
}
}
+# The follow configs apply to all targets except for unit tests, which rely on static
brettw 2014/06/03 21:14:03 80 cols
+# initializers. This config is included by everything that uses ":config" and then removed
+# for unit test targets.
+config("non_test_config") {
+ cflags = []
+
+ if (is_clang) {
+ cflags += [ "-Wglobal-constructors" ]
+ }
+}
+
# stubs ------------------------------------------------------------------------
# These set up include paths for targets that haven't been converted yet. They
« no previous file with comments | « no previous file | Source/platform/BUILD.gn » ('j') | Source/wtf/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698