| OLD | NEW |
| 1 # Copyright 2016 the V8 project authors. All rights reserved. | 1 # Copyright 2016 the V8 project 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/sanitizers/sanitizers.gni") | 5 import("//build/config/v8_target_cpu.gni") |
| 6 | 6 |
| 7 declare_args() { | 7 declare_args() { |
| 8 # Turns on compiler optimizations in V8 in Debug build. | 8 # Turns on compiler optimizations in V8 in Debug build. |
| 9 v8_optimized_debug = true | 9 v8_optimized_debug = true |
| 10 | 10 |
| 11 # Enable the snapshot feature, for fast context creation. | 11 # Enable the snapshot feature, for fast context creation. |
| 12 # http://v8project.blogspot.com/2015/09/custom-startup-snapshots.html | 12 # http://v8project.blogspot.com/2015/09/custom-startup-snapshots.html |
| 13 v8_use_snapshot = true | 13 v8_use_snapshot = true |
| 14 | 14 |
| 15 # Use external files for startup data blobs: | 15 # Use external files for startup data blobs: |
| 16 # the JS builtins sources and the start snapshot. | 16 # the JS builtins sources and the start snapshot. |
| 17 v8_use_external_startup_data = !is_ios | 17 v8_use_external_startup_data = !is_ios |
| 18 | |
| 19 # V8 generates code for this architecture. If v8_target_arch differs from | |
| 20 # target_cpu, a simulator will be run. | |
| 21 v8_target_arch = "" | |
| 22 } | |
| 23 | |
| 24 if (v8_target_arch == "") { | |
| 25 if (is_msan) { | |
| 26 # Running the V8-generated code on an ARM simulator is a powerful hack that | |
| 27 # allows the tool to see the memory accesses from JITted code. Without this | |
| 28 # flag, JS code causes false positive reports from MSan. | |
| 29 v8_target_arch = "arm64" | |
| 30 } else { | |
| 31 v8_target_arch = target_cpu | |
| 32 } | |
| 33 } | 18 } |
| 34 | 19 |
| 35 ############################################################################### | 20 ############################################################################### |
| 36 # Templates | 21 # Templates |
| 37 # | 22 # |
| 38 | 23 |
| 39 # Points to // in v8 stand-alone or to //v8/ in chromium. We need absolute | 24 # Points to // in v8 stand-alone or to //v8/ in chromium. We need absolute |
| 40 # paths for all configs in templates as they are shared in different | 25 # paths for all configs in templates as they are shared in different |
| 41 # subdirectories. | 26 # subdirectories. |
| 42 path_prefix = get_path_info("../", "abspath") | 27 path_prefix = get_path_info("../", "abspath") |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 } | 62 } |
| 78 | 63 |
| 79 template("v8_component") { | 64 template("v8_component") { |
| 80 component(target_name) { | 65 component(target_name) { |
| 81 forward_variables_from(invoker, "*", [ "configs" ]) | 66 forward_variables_from(invoker, "*", [ "configs" ]) |
| 82 configs += invoker.configs | 67 configs += invoker.configs |
| 83 configs -= remove_configs | 68 configs -= remove_configs |
| 84 configs += add_configs | 69 configs += add_configs |
| 85 } | 70 } |
| 86 } | 71 } |
| OLD | NEW |