| 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/*" ] |
| 11 | 11 |
| 12 # arguments -------------------------------------------------------------------- | 12 # arguments -------------------------------------------------------------------- |
| 13 | 13 |
| 14 declare_args() { | 14 declare_args() { |
| 15 # Set to true to enable the clang plugin that checks the usage of the Blink | 15 # Set to true to enable the clang plugin that checks the usage of the Blink |
| 16 # garbage-collection infrastructure during compilation. | 16 # garbage-collection infrastructure during compilation. |
| 17 blink_gc_plugin = true | 17 blink_gc_plugin = true |
| 18 | 18 |
| 19 # Set to true to have the clang Blink GC plugin emit class graph (in JSON) | 19 # Set to true to have the clang Blink GC plugin emit class graph (in JSON) |
| 20 # with typed pointer edges; for debugging or other (internal) uses. | 20 # with typed pointer edges; for debugging or other (internal) uses. |
| 21 blink_gc_plugin_option_do_dump_graph = false | 21 blink_gc_plugin_option_do_dump_graph = false |
| 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 |
| 28 # Set to true to have the clang Blink GC plugin use Chromium-style naming |
| 29 # rather than legacy Blink name. |
| 30 # TODO(https://crbug.com/675879): Remove this option after the Blink rename. |
| 31 blink_gc_plugin_option_use_chromium_style_naming = false |
| 27 } | 32 } |
| 28 | 33 |
| 29 # features --------------------------------------------------------------------- | 34 # features --------------------------------------------------------------------- |
| 30 | 35 |
| 31 config("features") { | 36 config("features") { |
| 32 defines = feature_defines_list | 37 defines = feature_defines_list |
| 33 } | 38 } |
| 34 | 39 |
| 35 # inside_blink ----------------------------------------------------------------- | 40 # inside_blink ----------------------------------------------------------------- |
| 36 | 41 |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 ] | 147 ] |
| 143 } | 148 } |
| 144 if (blink_gc_plugin_option_warn_unneeded_finalizer) { | 149 if (blink_gc_plugin_option_warn_unneeded_finalizer) { |
| 145 cflags += [ | 150 cflags += [ |
| 146 "-Xclang", | 151 "-Xclang", |
| 147 "-plugin-arg-blink-gc-plugin", | 152 "-plugin-arg-blink-gc-plugin", |
| 148 "-Xclang", | 153 "-Xclang", |
| 149 "warn-unneeded-finalizer", | 154 "warn-unneeded-finalizer", |
| 150 ] | 155 ] |
| 151 } | 156 } |
| 157 if (blink_gc_plugin_option_use_chromium_style_naming) { |
| 158 cflags += [ |
| 159 "-Xclang", |
| 160 "-plugin-arg-blink-gc-plugin", |
| 161 "-Xclang", |
| 162 "use-chromium-style-naming", |
| 163 ] |
| 164 } |
| 152 } | 165 } |
| 153 } | 166 } |
| 154 | 167 |
| 155 # The follow configs apply to all targets except for unit tests, which rely on | 168 # The follow configs apply to all targets except for unit tests, which rely on |
| 156 # static initializers. | 169 # static initializers. |
| 157 config("non_test_config") { | 170 config("non_test_config") { |
| 158 cflags = [] | 171 cflags = [] |
| 159 | 172 |
| 160 if (is_clang) { | 173 if (is_clang) { |
| 161 cflags += [ "-Wglobal-constructors" ] | 174 cflags += [ "-Wglobal-constructors" ] |
| 162 } | 175 } |
| 163 } | 176 } |
| 164 | 177 |
| 165 if (is_mac) { | 178 if (is_mac) { |
| 166 # This sets up precompiled headers for Mac. | 179 # This sets up precompiled headers for Mac. |
| 167 config("mac_precompiled_headers") { | 180 config("mac_precompiled_headers") { |
| 168 precompiled_header = rebase_path("build/mac/Prefix.h", root_build_dir) | 181 precompiled_header = rebase_path("build/mac/Prefix.h", root_build_dir) |
| 169 precompiled_source = "//third_party/WebKit/Source/build/mac/Prefix.h" | 182 precompiled_source = "//third_party/WebKit/Source/build/mac/Prefix.h" |
| 170 } | 183 } |
| 171 } | 184 } |
| OLD | NEW |