OLD | NEW |
---|---|
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("config.gni") | 5 import("config.gni") |
6 if (is_clang) { | 6 if (is_clang) { |
7 import("//build/config/clang/clang.gni") | 7 import("//build/config/clang/clang.gni") |
8 } | 8 } |
9 | 9 |
10 visibility = [ "//third_party/WebKit/*" ] | 10 visibility = [ "//third_party/WebKit/*" ] |
(...skipping 11 matching lines...) Expand all Loading... | |
22 | 22 |
23 # Set to true to have the clang Blink GC plugin additionally check if | 23 # Set to true to have the clang Blink GC plugin additionally check if |
24 # a class has an empty destructor which would be unnecessarily invoked | 24 # a class has an empty destructor which would be unnecessarily invoked |
25 # when finalized. | 25 # when finalized. |
26 blink_gc_plugin_option_warn_unneeded_finalizer = false | 26 blink_gc_plugin_option_warn_unneeded_finalizer = false |
27 | 27 |
28 # Set to true to have the clang Blink GC plugin use Chromium-style naming | 28 # Set to true to have the clang Blink GC plugin use Chromium-style naming |
29 # rather than legacy Blink name. | 29 # rather than legacy Blink name. |
30 # TODO(https://crbug.com/675879): Remove this option after the Blink rename. | 30 # TODO(https://crbug.com/675879): Remove this option after the Blink rename. |
31 blink_gc_plugin_option_use_chromium_style_naming = false | 31 blink_gc_plugin_option_use_chromium_style_naming = false |
32 | |
33 # Set to true to have the clang Blink GC plugin additionally check if | |
34 # stack only classes (i.e., STACK_ALLOCATED()-annotated) define an unused | |
35 # and unwanted trace method. | |
36 # TODO(https://crbug.com/689864): remove once the GC plugin has been rolled | |
37 # with this check default enabled. | |
38 blink_gc_plugin_option_warn_stack_allocated_trace_methods = true | |
Nico
2017/03/02 14:08:56
if the plan is to remove this soon again…
| |
32 } | 39 } |
33 | 40 |
34 # features --------------------------------------------------------------------- | 41 # features --------------------------------------------------------------------- |
35 | 42 |
36 config("features") { | 43 config("features") { |
37 defines = feature_defines_list | 44 defines = feature_defines_list |
38 } | 45 } |
39 | 46 |
40 # inside_blink ----------------------------------------------------------------- | 47 # inside_blink ----------------------------------------------------------------- |
41 | 48 |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
144 ] | 151 ] |
145 } | 152 } |
146 if (blink_gc_plugin_option_use_chromium_style_naming) { | 153 if (blink_gc_plugin_option_use_chromium_style_naming) { |
147 cflags += [ | 154 cflags += [ |
148 "-Xclang", | 155 "-Xclang", |
149 "-plugin-arg-blink-gc-plugin", | 156 "-plugin-arg-blink-gc-plugin", |
150 "-Xclang", | 157 "-Xclang", |
151 "use-chromium-style-naming", | 158 "use-chromium-style-naming", |
152 ] | 159 ] |
153 } | 160 } |
161 if (blink_gc_plugin_option_warn_stack_allocated_trace_methods) { | |
Nico
2017/03/02 14:08:56
…maybe just add it unconditionally here?
sof
2017/03/02 14:28:41
Yes, selectively turning it off shouldn't be neede
| |
162 cflags += [ | |
163 "-Xclang", | |
164 "-plugin-arg-blink-gc-plugin", | |
165 "-Xclang", | |
166 "warn-stack-allocated-trace-method", | |
167 ] | |
168 } | |
154 } | 169 } |
155 } | 170 } |
156 | 171 |
157 # The follow configs apply to all targets except for unit tests, which rely on | 172 # The follow configs apply to all targets except for unit tests, which rely on |
158 # static initializers. | 173 # static initializers. |
159 config("non_test_config") { | 174 config("non_test_config") { |
160 cflags = [] | 175 cflags = [] |
161 | 176 |
162 if (is_clang) { | 177 if (is_clang) { |
163 cflags += [ "-Wglobal-constructors" ] | 178 cflags += [ "-Wglobal-constructors" ] |
164 } | 179 } |
165 } | 180 } |
166 | 181 |
167 if (is_mac) { | 182 if (is_mac) { |
168 # This sets up precompiled headers for Mac. | 183 # This sets up precompiled headers for Mac. |
169 config("mac_precompiled_headers") { | 184 config("mac_precompiled_headers") { |
170 precompiled_header = rebase_path("build/mac/Prefix.h", root_build_dir) | 185 precompiled_header = rebase_path("build/mac/Prefix.h", root_build_dir) |
171 precompiled_source = "//third_party/WebKit/Source/build/mac/Prefix.h" | 186 precompiled_source = "//third_party/WebKit/Source/build/mac/Prefix.h" |
172 } | 187 } |
173 } | 188 } |
OLD | NEW |