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

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: depend on //base/allocator unconditionally, rely on allocator type switch Created 6 years, 6 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') | no next file with comments »
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..002dabbcd93639a0d150dac6265327751db860ee 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,16 @@ config("config") {
}
}
+# The follow configs apply to all targets except for unit tests, which rely on
+# static initializers.
+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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698