Chromium Code Reviews| 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("//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/dcheck_always_on.gni") |
| 8 import("//build/config/mips.gni") | 8 import("//build/config/mips.gni") |
| 9 import("//build/config/sanitizers/sanitizers.gni") | 9 import("//build/config/sanitizers/sanitizers.gni") |
| 10 | 10 |
| 11 if (is_android) { | 11 if (is_android) { |
| 12 import("//build/config/android/rules.gni") | 12 import("//build/config/android/rules.gni") |
| 13 } | 13 } |
| 14 | 14 |
| 15 import("gni/v8.gni") | 15 import("gni/v8.gni") |
| 16 import("gni/isolate.gni") | 16 import("gni/isolate.gni") |
| 17 import("snapshot_toolchain.gni") | 17 import("snapshot_toolchain.gni") |
| 18 | 18 |
| 19 declare_args() { | 19 declare_args() { |
| 20 # Print to stdout on Android. | 20 # Print to stdout on Android. |
| 21 v8_android_log_stdout = false | 21 v8_android_log_stdout = false |
| 22 | 22 |
| 23 # Sets -DVERIFY_HEAP. | 23 # Sets -DVERIFY_HEAP. |
| 24 v8_enable_verify_heap = false | 24 v8_enable_verify_heap = "" |
| 25 | 25 |
| 26 # Sets -DVERIFY_PREDICTABLE | 26 # Sets -DVERIFY_PREDICTABLE |
| 27 v8_enable_verify_predictable = false | 27 v8_enable_verify_predictable = false |
| 28 | 28 |
| 29 # Enable compiler warnings when using V8_DEPRECATED apis. | 29 # Enable compiler warnings when using V8_DEPRECATED apis. |
| 30 v8_deprecation_warnings = false | 30 v8_deprecation_warnings = false |
| 31 | 31 |
| 32 # Enable compiler warnings when using V8_DEPRECATE_SOON apis. | 32 # Enable compiler warnings when using V8_DEPRECATE_SOON apis. |
| 33 v8_imminent_deprecation_warnings = "" | 33 v8_imminent_deprecation_warnings = "" |
| 34 | 34 |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 45 v8_enable_handle_zapping = true | 45 v8_enable_handle_zapping = true |
| 46 | 46 |
| 47 # Enable slow dchecks. | 47 # Enable slow dchecks. |
| 48 v8_enable_slow_dchecks = false | 48 v8_enable_slow_dchecks = false |
| 49 | 49 |
| 50 # Interpreted regexp engine exists as platform-independent alternative | 50 # Interpreted regexp engine exists as platform-independent alternative |
| 51 # based where the regular expression is compiled to a bytecode. | 51 # based where the regular expression is compiled to a bytecode. |
| 52 v8_interpreted_regexp = false | 52 v8_interpreted_regexp = false |
| 53 | 53 |
| 54 # Sets -dOBJECT_PRINT. | 54 # Sets -dOBJECT_PRINT. |
| 55 v8_object_print = "" | 55 v8_enable_object_print = "" |
|
Michael Achenbach
2017/01/13 16:25:01
ok as it is consistent with the other flags now. B
| |
| 56 | |
| 57 # Sets -dTRACE_MAPS. | |
| 58 v8_enable_trace_maps = "" | |
| 59 | |
| 60 # Sets -dV8_ENABLE_CHECKS. | |
| 61 v8_enable_v8_checks = "" | |
| 56 | 62 |
| 57 # With post mortem support enabled, metadata is embedded into libv8 that | 63 # With post mortem support enabled, metadata is embedded into libv8 that |
| 58 # describes various parameters of the VM for use by debuggers. See | 64 # describes various parameters of the VM for use by debuggers. See |
| 59 # tools/gen-postmortem-metadata.py for details. | 65 # tools/gen-postmortem-metadata.py for details. |
| 60 v8_postmortem_support = false | 66 v8_postmortem_support = false |
| 61 | 67 |
| 62 # Switches off inlining in V8. | 68 # Switches off inlining in V8. |
| 63 v8_no_inline = false | 69 v8_no_inline = false |
| 64 | 70 |
| 65 # Override OS page size when generating snapshot | 71 # Override OS page size when generating snapshot |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 83 } | 89 } |
| 84 if (v8_enable_gdbjit == "") { | 90 if (v8_enable_gdbjit == "") { |
| 85 if (defined(v8_enable_gdbjit_default)) { | 91 if (defined(v8_enable_gdbjit_default)) { |
| 86 v8_enable_gdbjit = v8_enable_gdbjit_default | 92 v8_enable_gdbjit = v8_enable_gdbjit_default |
| 87 } else { | 93 } else { |
| 88 v8_enable_gdbjit = false | 94 v8_enable_gdbjit = false |
| 89 } | 95 } |
| 90 } | 96 } |
| 91 | 97 |
| 92 # Derived defaults. | 98 # Derived defaults. |
| 93 if (v8_object_print == "") { | 99 if (v8_enable_verify_heap == "") { |
| 94 v8_object_print = is_debug && !v8_optimized_debug | 100 v8_enable_verify_heap = is_debug |
| 101 } | |
| 102 if (v8_enable_object_print == "") { | |
| 103 v8_enable_object_print = is_debug | |
| 95 } | 104 } |
| 96 if (v8_enable_disassembler == "") { | 105 if (v8_enable_disassembler == "") { |
| 97 v8_enable_disassembler = is_debug && !v8_optimized_debug | 106 v8_enable_disassembler = is_debug |
| 107 } | |
| 108 if (v8_enable_trace_maps == "") { | |
| 109 v8_enable_trace_maps = is_debug | |
| 110 } | |
| 111 if (v8_enable_v8_checks == "") { | |
| 112 v8_enable_v8_checks = is_debug | |
| 98 } | 113 } |
| 99 | 114 |
| 100 # Specifies if the target build is a simulator build. Comparing target cpu | 115 # Specifies if the target build is a simulator build. Comparing target cpu |
| 101 # with v8 target cpu to not affect simulator builds for making cross-compile | 116 # with v8 target cpu to not affect simulator builds for making cross-compile |
| 102 # snapshots. | 117 # snapshots. |
| 103 is_target_simulator = target_cpu != v8_target_cpu | 118 is_target_simulator = target_cpu != v8_target_cpu |
| 104 | 119 |
| 105 v8_generated_peephole_source = "$target_gen_dir/bytecode-peephole-table.cc" | 120 v8_generated_peephole_source = "$target_gen_dir/bytecode-peephole-table.cc" |
| 106 v8_random_seed = "314159265" | 121 v8_random_seed = "314159265" |
| 107 v8_toolset_for_shell = "host" | 122 v8_toolset_for_shell = "host" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 173 visibility = [ ":*" ] # Only targets in this file can depend on this. | 188 visibility = [ ":*" ] # Only targets in this file can depend on this. |
| 174 | 189 |
| 175 defines = [] | 190 defines = [] |
| 176 | 191 |
| 177 if (v8_enable_disassembler) { | 192 if (v8_enable_disassembler) { |
| 178 defines += [ "ENABLE_DISASSEMBLER" ] | 193 defines += [ "ENABLE_DISASSEMBLER" ] |
| 179 } | 194 } |
| 180 if (v8_enable_gdbjit) { | 195 if (v8_enable_gdbjit) { |
| 181 defines += [ "ENABLE_GDB_JIT_INTERFACE" ] | 196 defines += [ "ENABLE_GDB_JIT_INTERFACE" ] |
| 182 } | 197 } |
| 183 if (v8_object_print) { | 198 if (v8_enable_object_print) { |
| 184 defines += [ "OBJECT_PRINT" ] | 199 defines += [ "OBJECT_PRINT" ] |
| 185 } | 200 } |
| 186 if (v8_enable_verify_heap) { | 201 if (v8_enable_verify_heap) { |
| 187 defines += [ "VERIFY_HEAP" ] | 202 defines += [ "VERIFY_HEAP" ] |
| 188 } | 203 } |
| 189 if (v8_enable_verify_predictable) { | 204 if (v8_enable_verify_predictable) { |
| 190 defines += [ "VERIFY_PREDICTABLE" ] | 205 defines += [ "VERIFY_PREDICTABLE" ] |
| 191 } | 206 } |
| 207 if (v8_enable_trace_maps) { | |
| 208 defines += [ "TRACE_MAPS" ] | |
| 209 } | |
| 210 if (v8_enable_v8_checks) { | |
| 211 defines += [ "V8_ENABLE_CHECKS" ] | |
| 212 } | |
| 192 if (v8_interpreted_regexp) { | 213 if (v8_interpreted_regexp) { |
| 193 defines += [ "V8_INTERPRETED_REGEXP" ] | 214 defines += [ "V8_INTERPRETED_REGEXP" ] |
| 194 } | 215 } |
| 195 if (v8_deprecation_warnings) { | 216 if (v8_deprecation_warnings) { |
| 196 defines += [ "V8_DEPRECATION_WARNINGS" ] | 217 defines += [ "V8_DEPRECATION_WARNINGS" ] |
| 197 } | 218 } |
| 198 if (v8_imminent_deprecation_warnings) { | 219 if (v8_imminent_deprecation_warnings) { |
| 199 defines += [ "V8_IMMINENT_DEPRECATION_WARNINGS" ] | 220 defines += [ "V8_IMMINENT_DEPRECATION_WARNINGS" ] |
| 200 } | 221 } |
| 201 if (v8_enable_i18n_support) { | 222 if (v8_enable_i18n_support) { |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 345 } | 366 } |
| 346 | 367 |
| 347 # TODO(jochen): Support v8_enable_prof on Windows. | 368 # TODO(jochen): Support v8_enable_prof on Windows. |
| 348 # TODO(jochen): Add support for compiling with simulators. | 369 # TODO(jochen): Add support for compiling with simulators. |
| 349 | 370 |
| 350 if (is_debug) { | 371 if (is_debug) { |
| 351 if (is_linux && v8_enable_backtrace) { | 372 if (is_linux && v8_enable_backtrace) { |
| 352 ldflags += [ "-rdynamic" ] | 373 ldflags += [ "-rdynamic" ] |
| 353 } | 374 } |
| 354 | 375 |
| 355 # TODO(jochen): Add support for different debug optimization levels. | 376 defines += [ "DEBUG" ] |
| 356 defines += [ | |
| 357 "ENABLE_DISASSEMBLER", | |
| 358 "V8_ENABLE_CHECKS", | |
| 359 "OBJECT_PRINT", | |
| 360 "VERIFY_HEAP", | |
| 361 "DEBUG", | |
| 362 "TRACE_MAPS", | |
| 363 ] | |
| 364 if (v8_enable_slow_dchecks) { | 377 if (v8_enable_slow_dchecks) { |
| 365 defines += [ "ENABLE_SLOW_DCHECKS" ] | 378 defines += [ "ENABLE_SLOW_DCHECKS" ] |
| 366 } | 379 } |
| 367 } else if (dcheck_always_on) { | 380 } else if (dcheck_always_on) { |
| 368 defines += [ "DEBUG" ] | 381 defines += [ "DEBUG" ] |
| 369 } | 382 } |
| 370 | 383 |
| 371 if (v8_no_inline) { | 384 if (v8_no_inline) { |
| 372 cflags += [ | 385 cflags += [ |
| 373 "-fno-inline-functions", | 386 "-fno-inline-functions", |
| (...skipping 2656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3030 ] | 3043 ] |
| 3031 | 3044 |
| 3032 configs = [ | 3045 configs = [ |
| 3033 ":external_config", | 3046 ":external_config", |
| 3034 ":internal_config_base", | 3047 ":internal_config_base", |
| 3035 ] | 3048 ] |
| 3036 } | 3049 } |
| 3037 | 3050 |
| 3038 v8_fuzzer("wasm_data_section_fuzzer") { | 3051 v8_fuzzer("wasm_data_section_fuzzer") { |
| 3039 } | 3052 } |
| OLD | NEW |