| 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/sanitizers/sanitizers.gni") |
| 6 import("//build/config/v8_target_cpu.gni") | 6 import("//build/config/v8_target_cpu.gni") |
| 7 | 7 |
| 8 declare_args() { | 8 declare_args() { |
| 9 # Indicate if valgrind was fetched as a custom deps to make it available on | 9 # Indicate if valgrind was fetched as a custom deps to make it available on |
| 10 # swarming. | 10 # swarming. |
| 11 v8_has_valgrind = false | 11 v8_has_valgrind = false |
| 12 | 12 |
| 13 # Indicate if gcmole was fetched as a hook to make it available on swarming. | 13 # Indicate if gcmole was fetched as a hook to make it available on swarming. |
| 14 v8_gcmole = false | 14 v8_gcmole = false |
| 15 | 15 |
| 16 # Turns on compiler optimizations in V8 in Debug build. | 16 # Turns on compiler optimizations in V8 in Debug build. |
| 17 v8_optimized_debug = true | 17 v8_optimized_debug = true |
| 18 | 18 |
| 19 # Support for backtrace_symbols on linux. | |
| 20 v8_enable_backtrace = "" | |
| 21 | |
| 22 # Enable the snapshot feature, for fast context creation. | 19 # Enable the snapshot feature, for fast context creation. |
| 23 # http://v8project.blogspot.com/2015/09/custom-startup-snapshots.html | 20 # http://v8project.blogspot.com/2015/09/custom-startup-snapshots.html |
| 24 v8_use_snapshot = true | 21 v8_use_snapshot = true |
| 25 | 22 |
| 26 # Use external files for startup data blobs: | 23 # Use external files for startup data blobs: |
| 27 # the JS builtins sources and the start snapshot. | 24 # the JS builtins sources and the start snapshot. |
| 28 v8_use_external_startup_data = "" | 25 v8_use_external_startup_data = "" |
| 29 } | 26 } |
| 30 | 27 |
| 31 if (v8_use_external_startup_data == "") { | 28 if (v8_use_external_startup_data == "") { |
| 32 # If not specified as a gn arg, use external startup data by default if | 29 # If not specified as a gn arg, use external startup data by default if |
| 33 # a snapshot is used and if we're not on ios. | 30 # a snapshot is used and if we're not on ios. |
| 34 v8_use_external_startup_data = v8_use_snapshot && !is_ios | 31 v8_use_external_startup_data = v8_use_snapshot && !is_ios |
| 35 } | 32 } |
| 36 | 33 |
| 37 if (v8_enable_backtrace == "") { | |
| 38 v8_enable_backtrace = is_debug | |
| 39 } | |
| 40 | |
| 41 ############################################################################### | 34 ############################################################################### |
| 42 # Templates | 35 # Templates |
| 43 # | 36 # |
| 44 | 37 |
| 45 # Points to // in v8 stand-alone or to //v8/ in chromium. We need absolute | 38 # Points to // in v8 stand-alone or to //v8/ in chromium. We need absolute |
| 46 # paths for all configs in templates as they are shared in different | 39 # paths for all configs in templates as they are shared in different |
| 47 # subdirectories. | 40 # subdirectories. |
| 48 v8_path_prefix = get_path_info("../", "abspath") | 41 v8_path_prefix = get_path_info("../", "abspath") |
| 49 | 42 |
| 50 # Common configs to remove or add in all v8 targets. | 43 # Common configs to remove or add in all v8 targets. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 63 | 56 |
| 64 # TODO(crbug.com/621335) Rework this so that we don't have the confusion | 57 # TODO(crbug.com/621335) Rework this so that we don't have the confusion |
| 65 # between "optimize_speed" and "optimize_max". | 58 # between "optimize_speed" and "optimize_max". |
| 66 if (is_posix && !is_android && !is_nacl && !using_sanitizer) { | 59 if (is_posix && !is_android && !is_nacl && !using_sanitizer) { |
| 67 v8_add_configs += [ "//build/config/compiler:optimize_speed" ] | 60 v8_add_configs += [ "//build/config/compiler:optimize_speed" ] |
| 68 } else { | 61 } else { |
| 69 v8_add_configs += [ "//build/config/compiler:optimize_max" ] | 62 v8_add_configs += [ "//build/config/compiler:optimize_max" ] |
| 70 } | 63 } |
| 71 } | 64 } |
| 72 | 65 |
| 73 if (is_posix && v8_enable_backtrace) { | |
| 74 v8_remove_configs += [ "//build/config/gcc:symbol_visibility_hidden" ] | |
| 75 v8_add_configs += [ "//build/config/gcc:symbol_visibility_default" ] | |
| 76 } | |
| 77 | |
| 78 # All templates should be kept in sync. | 66 # All templates should be kept in sync. |
| 79 template("v8_source_set") { | 67 template("v8_source_set") { |
| 80 source_set(target_name) { | 68 source_set(target_name) { |
| 81 forward_variables_from(invoker, "*", [ "configs" ]) | 69 forward_variables_from(invoker, "*", [ "configs" ]) |
| 82 configs += invoker.configs | 70 configs += invoker.configs |
| 83 configs -= v8_remove_configs | 71 configs -= v8_remove_configs |
| 84 configs += v8_add_configs | 72 configs += v8_add_configs |
| 85 } | 73 } |
| 86 } | 74 } |
| 87 | 75 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 99 } | 87 } |
| 100 | 88 |
| 101 template("v8_component") { | 89 template("v8_component") { |
| 102 component(target_name) { | 90 component(target_name) { |
| 103 forward_variables_from(invoker, "*", [ "configs" ]) | 91 forward_variables_from(invoker, "*", [ "configs" ]) |
| 104 configs += invoker.configs | 92 configs += invoker.configs |
| 105 configs -= v8_remove_configs | 93 configs -= v8_remove_configs |
| 106 configs += v8_add_configs | 94 configs += v8_add_configs |
| 107 } | 95 } |
| 108 } | 96 } |
| OLD | NEW |