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/mips.gni") | 7 import("//build/config/mips.gni") |
8 import("//build/config/sanitizers/sanitizers.gni") | 8 import("//build/config/sanitizers/sanitizers.gni") |
9 | 9 |
10 if (is_android) { | 10 if (is_android) { |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 v8_postmortem_support = false | 57 v8_postmortem_support = false |
58 | 58 |
59 # Similar to vfp but on MIPS. | 59 # Similar to vfp but on MIPS. |
60 v8_can_use_fpu_instructions = true | 60 v8_can_use_fpu_instructions = true |
61 | 61 |
62 # Similar to the ARM hard float ABI but on MIPS. | 62 # Similar to the ARM hard float ABI but on MIPS. |
63 v8_use_mips_abi_hardfloat = true | 63 v8_use_mips_abi_hardfloat = true |
64 } | 64 } |
65 | 65 |
66 v8_random_seed = "314159265" | 66 v8_random_seed = "314159265" |
67 v8_toolset_for_d8 = "host" | |
68 v8_toolset_for_shell = "host" | 67 v8_toolset_for_shell = "host" |
69 | 68 |
70 if (is_msan) { | 69 if (is_msan) { |
71 # Running the V8-generated code on an ARM simulator is a powerful hack that | 70 # Running the V8-generated code on an ARM simulator is a powerful hack that |
72 # allows the tool to see the memory accesses from JITted code. Without this | 71 # allows the tool to see the memory accesses from JITted code. Without this |
73 # flag, JS code causes false positive reports from MSan. | 72 # flag, JS code causes false positive reports from MSan. |
74 v8_target_arch = "arm64" | 73 v8_target_arch = "arm64" |
75 } else { | 74 } else { |
76 v8_target_arch = target_cpu | 75 v8_target_arch = target_cpu |
77 } | 76 } |
(...skipping 1981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2059 } else { | 2058 } else { |
2060 group("v8") { | 2059 group("v8") { |
2061 public_deps = [ | 2060 public_deps = [ |
2062 ":v8_base", | 2061 ":v8_base", |
2063 snapshot_target, | 2062 snapshot_target, |
2064 ] | 2063 ] |
2065 public_configs = [ ":external_config" ] | 2064 public_configs = [ ":external_config" ] |
2066 } | 2065 } |
2067 } | 2066 } |
2068 | 2067 |
2069 if ((current_toolchain == host_toolchain && v8_toolset_for_d8 == "host") || | 2068 executable("d8") { |
2070 (current_toolchain == snapshot_toolchain && v8_toolset_for_d8 == "host") || | 2069 sources = [ |
2071 (current_toolchain != host_toolchain && v8_toolset_for_d8 == "target")) { | 2070 "src/d8.cc", |
2072 executable("d8") { | 2071 "src/d8.h", |
| 2072 ] |
| 2073 |
| 2074 configs -= [ "//build/config/compiler:chromium_code" ] |
| 2075 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 2076 configs += [ |
| 2077 # Note: don't use :internal_config here because this target will get |
| 2078 # the :external_config applied to it by virtue of depending on :v8, and |
| 2079 # you can't have both applied to the same target. |
| 2080 ":internal_config_base", |
| 2081 ":features", |
| 2082 ":toolchain", |
| 2083 ] |
| 2084 |
| 2085 deps = [ |
| 2086 ":d8_js2c", |
| 2087 ":v8", |
| 2088 ":v8_libplatform", |
| 2089 "//build/config/sanitizers:deps", |
| 2090 "//build/win:default_exe_manifest", |
| 2091 ] |
| 2092 |
| 2093 # TODO(jochen): Add support for vtunejit. |
| 2094 |
| 2095 if (is_posix) { |
| 2096 sources += [ "src/d8-posix.cc" ] |
| 2097 } else if (is_win) { |
| 2098 sources += [ "src/d8-windows.cc" ] |
| 2099 } |
| 2100 |
| 2101 if (!is_component_build) { |
| 2102 sources += [ "$target_gen_dir/d8-js.cc" ] |
| 2103 } |
| 2104 if (v8_enable_i18n_support) { |
| 2105 deps += [ "//third_party/icu" ] |
| 2106 } |
| 2107 } |
| 2108 |
| 2109 if ((current_toolchain == host_toolchain && v8_toolset_for_shell == "host") || (
current_toolchain == snapshot_toolchain && v8_toolset_for_shell == "host") || (c
urrent_toolchain != host_toolchain && v8_toolset_for_shell == "target")) { |
| 2110 executable("v8_shell") { |
2073 sources = [ | 2111 sources = [ |
2074 "src/d8.cc", | 2112 "samples/shell.cc", |
2075 "src/d8.h", | |
2076 ] | 2113 ] |
2077 | 2114 |
2078 configs -= [ "//build/config/compiler:chromium_code" ] | 2115 configs -= [ "//build/config/compiler:chromium_code" ] |
2079 configs += [ "//build/config/compiler:no_chromium_code" ] | 2116 configs += [ "//build/config/compiler:no_chromium_code" ] |
2080 configs += [ | 2117 configs += [ |
2081 # Note: don't use :internal_config here because this target will get | 2118 # Note: don't use :internal_config here because this target will get |
2082 # the :external_config applied to it by virtue of depending on :v8, and | 2119 # the :external_config applied to it by virtue of depending on :v8, and |
2083 # you can't have both applied to the same target. | 2120 # you can't have both applied to the same target. |
2084 ":internal_config_base", | 2121 ":internal_config_base", |
2085 ":features", | 2122 ":features", |
2086 ":toolchain", | 2123 ":toolchain", |
2087 ] | 2124 ] |
2088 | 2125 |
2089 deps = [ | 2126 deps = [ |
2090 ":d8_js2c", | |
2091 ":v8", | |
2092 ":v8_libplatform", | |
2093 "//build/config/sanitizers:deps", | |
2094 "//build/win:default_exe_manifest", | |
2095 ] | |
2096 | |
2097 # TODO(jochen): Add support for vtunejit. | |
2098 | |
2099 if (is_posix) { | |
2100 sources += [ "src/d8-posix.cc" ] | |
2101 } else if (is_win) { | |
2102 sources += [ "src/d8-windows.cc" ] | |
2103 } | |
2104 | |
2105 if (!is_component_build) { | |
2106 sources += [ "$target_gen_dir/d8-js.cc" ] | |
2107 } | |
2108 if (v8_enable_i18n_support) { | |
2109 deps += [ "//third_party/icu" ] | |
2110 } | |
2111 } | |
2112 } | |
2113 | |
2114 if ((current_toolchain == host_toolchain && v8_toolset_for_shell == "host") || (
current_toolchain == snapshot_toolchain && v8_toolset_for_shell == "host") || (c
urrent_toolchain != host_toolchain && v8_toolset_for_shell == "target")) { | |
2115 executable("v8_shell") { | |
2116 sources = [ | |
2117 "samples/shell.cc", | |
2118 ] | |
2119 | |
2120 configs -= [ "//build/config/compiler:chromium_code" ] | |
2121 configs += [ "//build/config/compiler:no_chromium_code" ] | |
2122 configs += [ | |
2123 # Note: don't use :internal_config here because this target will get | |
2124 # the :external_config applied to it by virtue of depending on :v8, and | |
2125 # you can't have both applied to the same target. | |
2126 ":internal_config_base", | |
2127 ":features", | |
2128 ":toolchain", | |
2129 ] | |
2130 | |
2131 deps = [ | |
2132 ":v8", | 2127 ":v8", |
2133 ":v8_libplatform", | 2128 ":v8_libplatform", |
2134 "//build/config/sanitizers:deps", | 2129 "//build/config/sanitizers:deps", |
2135 "//build/win:default_exe_manifest", | 2130 "//build/win:default_exe_manifest", |
2136 ] | 2131 ] |
2137 | 2132 |
2138 if (v8_enable_i18n_support) { | 2133 if (v8_enable_i18n_support) { |
2139 deps += [ "//third_party/icu" ] | 2134 deps += [ "//third_party/icu" ] |
2140 } | 2135 } |
2141 } | 2136 } |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2203 ] | 2198 ] |
2204 | 2199 |
2205 deps = [ | 2200 deps = [ |
2206 ":fuzzer_support", | 2201 ":fuzzer_support", |
2207 ] | 2202 ] |
2208 | 2203 |
2209 configs = [ | 2204 configs = [ |
2210 ":internal_config", | 2205 ":internal_config", |
2211 ] | 2206 ] |
2212 } | 2207 } |
OLD | NEW |