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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 # Similar to vfp but on MIPS. | 62 # Similar to vfp but on MIPS. |
63 v8_can_use_fpu_instructions = true | 63 v8_can_use_fpu_instructions = true |
64 | 64 |
65 # Similar to the ARM hard float ABI but on MIPS. | 65 # Similar to the ARM hard float ABI but on MIPS. |
66 v8_use_mips_abi_hardfloat = true | 66 v8_use_mips_abi_hardfloat = true |
67 } | 67 } |
68 | 68 |
69 v8_random_seed = "314159265" | 69 v8_random_seed = "314159265" |
70 v8_toolset_for_shell = "host" | 70 v8_toolset_for_shell = "host" |
71 | 71 |
| 72 if (v8_use_snapshot && v8_use_external_startup_data) { |
| 73 snapshot_target = ":v8_external_snapshot" |
| 74 } else if (v8_use_snapshot) { |
| 75 snapshot_target = ":v8_snapshot" |
| 76 } else { |
| 77 assert(!v8_use_external_startup_data) |
| 78 snapshot_target = ":v8_nosnapshot" |
| 79 } |
| 80 |
72 ############################################################################### | 81 ############################################################################### |
73 # Configurations | 82 # Configurations |
74 # | 83 # |
75 config("internal_config") { | 84 config("internal_config") { |
76 visibility = [ ":*" ] # Only targets in this file can depend on this. | 85 visibility = [ ":*" ] # Only targets in this file can depend on this. |
77 | 86 |
78 include_dirs = [ "." ] | 87 include_dirs = [ "." ] |
79 | 88 |
80 if (is_component_build) { | 89 if (is_component_build) { |
81 defines = [ | 90 defines = [ |
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
627 "--startup_blob", | 636 "--startup_blob", |
628 rebase_path("$root_out_dir/snapshot_blob.bin", root_build_dir), | 637 rebase_path("$root_out_dir/snapshot_blob.bin", root_build_dir), |
629 ] | 638 ] |
630 } | 639 } |
631 } | 640 } |
632 | 641 |
633 ############################################################################### | 642 ############################################################################### |
634 # Source Sets (aka static libraries) | 643 # Source Sets (aka static libraries) |
635 # | 644 # |
636 | 645 |
637 source_set("v8_maybe_snapshot") { | |
638 if (v8_use_snapshot && v8_use_external_startup_data) { | |
639 public_deps = [ ":v8_external_snapshot" ] | |
640 } else if (v8_use_snapshot) { | |
641 public_deps = [ ":v8_snapshot" ] | |
642 } else { | |
643 assert(!v8_use_external_startup_data) | |
644 public_deps = [ ":v8_nosnapshot" ] | |
645 } | |
646 } | |
647 | |
648 v8_source_set("v8_nosnapshot") { | 646 v8_source_set("v8_nosnapshot") { |
649 visibility = [ ":*" ] # Only targets in this file can depend on this. | 647 visibility = [ ":*" ] # Only targets in this file can depend on this. |
650 | 648 |
651 deps = [ | 649 deps = [ |
652 ":js2c", | 650 ":js2c", |
653 ":js2c_experimental", | 651 ":js2c_experimental", |
654 ":js2c_experimental_extras", | 652 ":js2c_experimental_extras", |
655 ":js2c_extras", | 653 ":js2c_extras", |
656 ":v8_base", | 654 ":v8_base", |
657 ] | 655 ] |
(...skipping 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1997 visibility = [ ":*" ] # Only targets in this file can depend on this. | 1995 visibility = [ ":*" ] # Only targets in this file can depend on this. |
1998 | 1996 |
1999 sources = [ | 1997 sources = [ |
2000 "test/fuzzer/fuzzer-support.cc", | 1998 "test/fuzzer/fuzzer-support.cc", |
2001 "test/fuzzer/fuzzer-support.h", | 1999 "test/fuzzer/fuzzer-support.h", |
2002 ] | 2000 ] |
2003 | 2001 |
2004 configs = [ ":internal_config_base" ] | 2002 configs = [ ":internal_config_base" ] |
2005 | 2003 |
2006 deps = [ | 2004 deps = [ |
2007 ":v8_maybe_snapshot", | 2005 snapshot_target, |
2008 ] | 2006 ] |
2009 | 2007 |
2010 public_deps = [ | 2008 public_deps = [ |
2011 ":v8_libplatform", | 2009 ":v8_libplatform", |
2012 ] | 2010 ] |
2013 } | 2011 } |
2014 | 2012 |
2015 ############################################################################### | 2013 ############################################################################### |
2016 # Executables | 2014 # Executables |
2017 # | 2015 # |
(...skipping 21 matching lines...) Expand all Loading... |
2039 "//build/config/sanitizers:deps", | 2037 "//build/config/sanitizers:deps", |
2040 "//build/win:default_exe_manifest", | 2038 "//build/win:default_exe_manifest", |
2041 ] | 2039 ] |
2042 } | 2040 } |
2043 } | 2041 } |
2044 | 2042 |
2045 ############################################################################### | 2043 ############################################################################### |
2046 # Public targets | 2044 # Public targets |
2047 # | 2045 # |
2048 | 2046 |
2049 want_v8_shell = ( | |
2050 (current_toolchain == host_toolchain && v8_toolset_for_shell == "host") || | |
2051 (current_toolchain == v8_snapshot_toolchain && | |
2052 v8_toolset_for_shell == "host") || | |
2053 (current_toolchain != host_toolchain && v8_toolset_for_shell == "target")) | |
2054 | |
2055 group("gn_all") { | |
2056 testonly = true | |
2057 | |
2058 deps = [ | |
2059 ":d8", | |
2060 ] | |
2061 | |
2062 if (want_v8_shell) { | |
2063 deps += [ | |
2064 ":v8_shell", | |
2065 ] | |
2066 } | |
2067 | |
2068 if (host_os != "mac" || !is_android) { | |
2069 # These items don't compile for Android on Mac. | |
2070 deps += [ | |
2071 "test/unittests:unittests", | |
2072 ] | |
2073 } | |
2074 } | |
2075 | |
2076 if (is_component_build) { | 2047 if (is_component_build) { |
2077 component("v8") { | 2048 component("v8") { |
2078 sources = [ | 2049 sources = [ |
2079 "src/v8dll-main.cc", | 2050 "src/v8dll-main.cc", |
2080 ] | 2051 ] |
2081 | 2052 |
2082 public_deps = [ | 2053 public_deps = [ |
2083 ":v8_base", | 2054 ":v8_base", |
2084 ":v8_maybe_snapshot", | 2055 snapshot_target, |
2085 ] | 2056 ] |
2086 | 2057 |
2087 configs -= [ "//build/config/compiler:chromium_code" ] | 2058 configs -= [ "//build/config/compiler:chromium_code" ] |
2088 configs += [ "//build/config/compiler:no_chromium_code" ] | 2059 configs += [ "//build/config/compiler:no_chromium_code" ] |
2089 configs += [ | 2060 configs += [ |
2090 ":internal_config", | 2061 ":internal_config", |
2091 ":features", | 2062 ":features", |
2092 ":toolchain", | 2063 ":toolchain", |
2093 ] | 2064 ] |
2094 | 2065 |
2095 public_configs = [ ":external_config" ] | 2066 public_configs = [ ":external_config" ] |
2096 } | 2067 } |
2097 } else { | 2068 } else { |
2098 group("v8") { | 2069 group("v8") { |
2099 public_deps = [ | 2070 public_deps = [ |
2100 ":v8_base", | 2071 ":v8_base", |
2101 ":v8_maybe_snapshot", | 2072 snapshot_target, |
2102 ] | 2073 ] |
2103 public_configs = [ ":external_config" ] | 2074 public_configs = [ ":external_config" ] |
2104 } | 2075 } |
2105 } | 2076 } |
2106 | 2077 |
2107 executable("d8") { | 2078 executable("d8") { |
2108 sources = [ | 2079 sources = [ |
2109 "src/d8.cc", | 2080 "src/d8.cc", |
2110 "src/d8.h", | 2081 "src/d8.h", |
2111 ] | 2082 ] |
(...skipping 26 matching lines...) Expand all Loading... |
2138 } | 2109 } |
2139 | 2110 |
2140 if (!is_component_build) { | 2111 if (!is_component_build) { |
2141 sources += [ "$target_gen_dir/d8-js.cc" ] | 2112 sources += [ "$target_gen_dir/d8-js.cc" ] |
2142 } | 2113 } |
2143 if (v8_enable_i18n_support) { | 2114 if (v8_enable_i18n_support) { |
2144 deps += [ "//third_party/icu" ] | 2115 deps += [ "//third_party/icu" ] |
2145 } | 2116 } |
2146 } | 2117 } |
2147 | 2118 |
2148 if (want_v8_shell) { | 2119 if ((current_toolchain == host_toolchain && v8_toolset_for_shell == "host") || |
| 2120 (current_toolchain == v8_snapshot_toolchain && |
| 2121 v8_toolset_for_shell == "host") || |
| 2122 (current_toolchain != host_toolchain && v8_toolset_for_shell == "target")) { |
2149 executable("v8_shell") { | 2123 executable("v8_shell") { |
2150 sources = [ | 2124 sources = [ |
2151 "samples/shell.cc", | 2125 "samples/shell.cc", |
2152 ] | 2126 ] |
2153 | 2127 |
2154 configs -= [ "//build/config/compiler:chromium_code" ] | 2128 configs -= [ "//build/config/compiler:chromium_code" ] |
2155 configs += [ "//build/config/compiler:no_chromium_code" ] | 2129 configs += [ "//build/config/compiler:no_chromium_code" ] |
2156 configs += [ | 2130 configs += [ |
2157 # Note: don't use :internal_config here because this target will get | 2131 # Note: don't use :internal_config here because this target will get |
2158 # the :external_config applied to it by virtue of depending on :v8, and | 2132 # the :external_config applied to it by virtue of depending on :v8, and |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2227 sources = [ | 2201 sources = [ |
2228 "test/fuzzer/wasm-asmjs.cc", | 2202 "test/fuzzer/wasm-asmjs.cc", |
2229 ] | 2203 ] |
2230 | 2204 |
2231 deps = [ | 2205 deps = [ |
2232 ":fuzzer_support", | 2206 ":fuzzer_support", |
2233 ] | 2207 ] |
2234 | 2208 |
2235 configs = [ ":internal_config" ] | 2209 configs = [ ":internal_config" ] |
2236 } | 2210 } |
OLD | NEW |