Chromium Code Reviews| 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 |