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

Side by Side Diff: BUILD.gn

Issue 2024833002: [gn] Rework debug configurations (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | build_overrides/v8.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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("//build/config/android/config.gni") 5 import("//build/config/android/config.gni")
6 import("//build/config/arm.gni") 6 import("//build/config/arm.gni")
7 import("//build/config/dcheck_always_on.gni")
7 import("//build/config/mips.gni") 8 import("//build/config/mips.gni")
8 import("//build/config/sanitizers/sanitizers.gni") 9 import("//build/config/sanitizers/sanitizers.gni")
9 10
10 if (is_android) { 11 if (is_android) {
11 import("//build/config/android/rules.gni") 12 import("//build/config/android/rules.gni")
12 } 13 }
13 14
14 import("gni/v8.gni") 15 import("gni/v8.gni")
15 import("//build_overrides/v8.gni") 16 import("//build_overrides/v8.gni")
16 17
(...skipping 23 matching lines...) Expand all
40 # Sets -dENABLE_GDB_JIT_INTERFACE. 41 # Sets -dENABLE_GDB_JIT_INTERFACE.
41 v8_enable_gdbjit = false 42 v8_enable_gdbjit = false
42 43
43 # Sets -dENABLE_HANDLE_ZAPPING. 44 # Sets -dENABLE_HANDLE_ZAPPING.
44 v8_enable_handle_zapping = true 45 v8_enable_handle_zapping = true
45 46
46 # Enable ECMAScript Internationalization API. Enabling this feature will 47 # Enable ECMAScript Internationalization API. Enabling this feature will
47 # add a dependency on the ICU library. 48 # add a dependency on the ICU library.
48 v8_enable_i18n_support = true 49 v8_enable_i18n_support = true
49 50
51 # Enable slow dchecks.
52 v8_enable_slow_dchecks = false
53
50 # Interpreted regexp engine exists as platform-independent alternative 54 # Interpreted regexp engine exists as platform-independent alternative
51 # based where the regular expression is compiled to a bytecode. 55 # based where the regular expression is compiled to a bytecode.
52 v8_interpreted_regexp = false 56 v8_interpreted_regexp = false
53 57
54 # Sets -dOBJECT_PRINT. 58 # Sets -dOBJECT_PRINT.
55 v8_object_print = false 59 v8_object_print = false
56 60
61 # Turns on compiler optimizations in V8 in Debug build.
62 v8_optimized_debug = true
63
57 # With post mortem support enabled, metadata is embedded into libv8 that 64 # With post mortem support enabled, metadata is embedded into libv8 that
58 # describes various parameters of the VM for use by debuggers. See 65 # describes various parameters of the VM for use by debuggers. See
59 # tools/gen-postmortem-metadata.py for details. 66 # tools/gen-postmortem-metadata.py for details.
60 v8_postmortem_support = false 67 v8_postmortem_support = false
61 68
62 # Similar to vfp but on MIPS. 69 # Similar to vfp but on MIPS.
63 v8_can_use_fpu_instructions = true 70 v8_can_use_fpu_instructions = true
64 71
65 # Similar to the ARM hard float ABI but on MIPS. 72 # Similar to the ARM hard float ABI but on MIPS.
66 v8_use_mips_abi_hardfloat = true 73 v8_use_mips_abi_hardfloat = true
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 if (v8_use_external_startup_data) { 130 if (v8_use_external_startup_data) {
124 defines = [ "V8_USE_EXTERNAL_STARTUP_DATA" ] 131 defines = [ "V8_USE_EXTERNAL_STARTUP_DATA" ]
125 } 132 }
126 } 133 }
127 134
128 config("features") { 135 config("features") {
129 visibility = [ ":*" ] # Only targets in this file can depend on this. 136 visibility = [ ":*" ] # Only targets in this file can depend on this.
130 137
131 defines = [] 138 defines = []
132 139
140 if (!is_debug && dcheck_always_on) {
141 defines += [ "DEBUG" ]
vogelheim 2016/05/31 14:04:54 readability nitpick, and not really sure about thi
Michael Achenbach 2016/05/31 14:14:34 Yea - can do. I wasn't really sure about what is a
142 }
133 if (v8_enable_disassembler) { 143 if (v8_enable_disassembler) {
134 defines += [ "ENABLE_DISASSEMBLER" ] 144 defines += [ "ENABLE_DISASSEMBLER" ]
135 } 145 }
136 if (v8_enable_gdbjit) { 146 if (v8_enable_gdbjit) {
137 defines += [ "ENABLE_GDB_JIT_INTERFACE" ] 147 defines += [ "ENABLE_GDB_JIT_INTERFACE" ]
138 } 148 }
139 if (v8_object_print) { 149 if (v8_object_print) {
140 defines += [ "OBJECT_PRINT" ] 150 defines += [ "OBJECT_PRINT" ]
141 } 151 }
142 if (v8_enable_verify_heap) { 152 if (v8_enable_verify_heap) {
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 if (is_debug) { 297 if (is_debug) {
288 # TODO(jochen): Add support for different debug optimization levels. 298 # TODO(jochen): Add support for different debug optimization levels.
289 defines += [ 299 defines += [
290 "ENABLE_DISASSEMBLER", 300 "ENABLE_DISASSEMBLER",
291 "V8_ENABLE_CHECKS", 301 "V8_ENABLE_CHECKS",
292 "OBJECT_PRINT", 302 "OBJECT_PRINT",
293 "VERIFY_HEAP", 303 "VERIFY_HEAP",
294 "DEBUG", 304 "DEBUG",
295 "TRACE_MAPS", 305 "TRACE_MAPS",
296 ] 306 ]
297 if (!v8_optimized_debug) { 307 if (v8_enable_slow_dchecks) {
298 defines += [ "ENABLE_SLOW_DCHECKS" ] 308 defines += [ "ENABLE_SLOW_DCHECKS" ]
299 } 309 }
300 } 310 }
301 } 311 }
302 312
303 ############################################################################### 313 ###############################################################################
304 # Templates 314 # Templates
305 # 315 #
306 316
307 template("v8_source_set") { 317 template("v8_source_set") {
308 source_set(target_name) { 318 source_set(target_name) {
309 forward_variables_from(invoker, "*", [ "configs" ]) 319 forward_variables_from(invoker, "*", [ "configs" ])
310 configs += invoker.configs 320 configs += invoker.configs
311 configs -= [ "//build/config/compiler:chromium_code" ] 321 configs -= [ "//build/config/compiler:chromium_code" ]
312 configs += [ "//build/config/compiler:no_chromium_code" ] 322 configs += [ "//build/config/compiler:no_chromium_code" ]
313 configs += [ 323 configs += [
314 ":features", 324 ":features",
315 ":toolchain", 325 ":toolchain",
316 ] 326 ]
317 327
318 if (!is_debug || v8_optimized_debug) { 328 # TODO(machenbach): This config doesn't affect executables and components.
329 # It should be moved to a common place.
330 if (is_debug && !v8_optimized_debug) {
331 configs -= [ "//build/config/compiler:default_optimization" ]
332 configs += [ "//build/config/compiler:no_optimize" ]
333 } else {
319 configs -= [ "//build/config/compiler:default_optimization" ] 334 configs -= [ "//build/config/compiler:default_optimization" ]
320 configs += [ "//build/config/compiler:optimize_max" ] 335 configs += [ "//build/config/compiler:optimize_max" ]
321 } 336 }
322 } 337 }
323 } 338 }
324 339
325 ############################################################################### 340 ###############################################################################
326 # Actions 341 # Actions
327 # 342 #
328 343
(...skipping 1902 matching lines...) Expand 10 before | Expand all | Expand 10 after
2231 sources = [ 2246 sources = [
2232 "test/fuzzer/wasm-asmjs.cc", 2247 "test/fuzzer/wasm-asmjs.cc",
2233 ] 2248 ]
2234 2249
2235 deps = [ 2250 deps = [
2236 ":fuzzer_support", 2251 ":fuzzer_support",
2237 ] 2252 ]
2238 2253
2239 configs = [ ":internal_config" ] 2254 configs = [ ":internal_config" ]
2240 } 2255 }
OLDNEW
« no previous file with comments | « no previous file | build_overrides/v8.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698