Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Side by Side Diff: BUILD.gn

Issue 2011853002: [gn] Add unittests (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Clean up Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | build_overrides/gtest.gni » ('j') | test/unittests/BUILD.gn » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
81 ############################################################################### 72 ###############################################################################
82 # Configurations 73 # Configurations
83 # 74 #
84 config("internal_config") { 75 config("internal_config") {
85 visibility = [ ":*" ] # Only targets in this file can depend on this. 76 visibility = [ ":*" ] # Only targets in this file can depend on this.
86 77
87 include_dirs = [ "." ] 78 include_dirs = [ "." ]
88 79
89 if (is_component_build) { 80 if (is_component_build) {
90 defines = [ 81 defines = [
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 "--startup_blob", 627 "--startup_blob",
637 rebase_path("$root_out_dir/snapshot_blob.bin", root_build_dir), 628 rebase_path("$root_out_dir/snapshot_blob.bin", root_build_dir),
638 ] 629 ]
639 } 630 }
640 } 631 }
641 632
642 ############################################################################### 633 ###############################################################################
643 # Source Sets (aka static libraries) 634 # Source Sets (aka static libraries)
644 # 635 #
645 636
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
646 v8_source_set("v8_nosnapshot") { 648 v8_source_set("v8_nosnapshot") {
647 visibility = [ ":*" ] # Only targets in this file can depend on this. 649 visibility = [ ":*" ] # Only targets in this file can depend on this.
648 650
649 deps = [ 651 deps = [
650 ":js2c", 652 ":js2c",
651 ":js2c_experimental", 653 ":js2c_experimental",
652 ":js2c_experimental_extras", 654 ":js2c_experimental_extras",
653 ":js2c_extras", 655 ":js2c_extras",
654 ":v8_base", 656 ":v8_base",
655 ] 657 ]
(...skipping 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after
1995 visibility = [ ":*" ] # Only targets in this file can depend on this. 1997 visibility = [ ":*" ] # Only targets in this file can depend on this.
1996 1998
1997 sources = [ 1999 sources = [
1998 "test/fuzzer/fuzzer-support.cc", 2000 "test/fuzzer/fuzzer-support.cc",
1999 "test/fuzzer/fuzzer-support.h", 2001 "test/fuzzer/fuzzer-support.h",
2000 ] 2002 ]
2001 2003
2002 configs = [ ":internal_config_base" ] 2004 configs = [ ":internal_config_base" ]
2003 2005
2004 deps = [ 2006 deps = [
2005 snapshot_target, 2007 ":v8_maybe_snapshot",
2006 ] 2008 ]
2007 2009
2008 public_deps = [ 2010 public_deps = [
2009 ":v8_libplatform", 2011 ":v8_libplatform",
2010 ] 2012 ]
2011 } 2013 }
2012 2014
2013 ############################################################################### 2015 ###############################################################################
2014 # Executables 2016 # Executables
2015 # 2017 #
(...skipping 21 matching lines...) Expand all
2037 "//build/config/sanitizers:deps", 2039 "//build/config/sanitizers:deps",
2038 "//build/win:default_exe_manifest", 2040 "//build/win:default_exe_manifest",
2039 ] 2041 ]
2040 } 2042 }
2041 } 2043 }
2042 2044
2043 ############################################################################### 2045 ###############################################################################
2044 # Public targets 2046 # Public targets
2045 # 2047 #
2046 2048
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
2047 if (is_component_build) { 2076 if (is_component_build) {
2048 component("v8") { 2077 component("v8") {
2049 sources = [ 2078 sources = [
2050 "src/v8dll-main.cc", 2079 "src/v8dll-main.cc",
2051 ] 2080 ]
2052 2081
2053 public_deps = [ 2082 public_deps = [
2054 ":v8_base", 2083 ":v8_base",
2055 snapshot_target, 2084 ":v8_maybe_snapshot",
2056 ] 2085 ]
2057 2086
2058 configs -= [ "//build/config/compiler:chromium_code" ] 2087 configs -= [ "//build/config/compiler:chromium_code" ]
2059 configs += [ "//build/config/compiler:no_chromium_code" ] 2088 configs += [ "//build/config/compiler:no_chromium_code" ]
2060 configs += [ 2089 configs += [
2061 ":internal_config", 2090 ":internal_config",
2062 ":features", 2091 ":features",
2063 ":toolchain", 2092 ":toolchain",
2064 ] 2093 ]
2065 2094
2066 public_configs = [ ":external_config" ] 2095 public_configs = [ ":external_config" ]
2067 } 2096 }
2068 } else { 2097 } else {
2069 group("v8") { 2098 group("v8") {
2070 public_deps = [ 2099 public_deps = [
2071 ":v8_base", 2100 ":v8_base",
2072 snapshot_target, 2101 ":v8_maybe_snapshot",
2073 ] 2102 ]
2074 public_configs = [ ":external_config" ] 2103 public_configs = [ ":external_config" ]
2075 } 2104 }
2076 } 2105 }
2077 2106
2078 executable("d8") { 2107 executable("d8") {
2079 sources = [ 2108 sources = [
2080 "src/d8.cc", 2109 "src/d8.cc",
2081 "src/d8.h", 2110 "src/d8.h",
2082 ] 2111 ]
(...skipping 26 matching lines...) Expand all
2109 } 2138 }
2110 2139
2111 if (!is_component_build) { 2140 if (!is_component_build) {
2112 sources += [ "$target_gen_dir/d8-js.cc" ] 2141 sources += [ "$target_gen_dir/d8-js.cc" ]
2113 } 2142 }
2114 if (v8_enable_i18n_support) { 2143 if (v8_enable_i18n_support) {
2115 deps += [ "//third_party/icu" ] 2144 deps += [ "//third_party/icu" ]
2116 } 2145 }
2117 } 2146 }
2118 2147
2119 if ((current_toolchain == host_toolchain && v8_toolset_for_shell == "host") || 2148 if (want_v8_shell) {
2120 (current_toolchain == v8_snapshot_toolchain &&
2121 v8_toolset_for_shell == "host") ||
2122 (current_toolchain != host_toolchain && v8_toolset_for_shell == "target")) {
2123 executable("v8_shell") { 2149 executable("v8_shell") {
2124 sources = [ 2150 sources = [
2125 "samples/shell.cc", 2151 "samples/shell.cc",
2126 ] 2152 ]
2127 2153
2128 configs -= [ "//build/config/compiler:chromium_code" ] 2154 configs -= [ "//build/config/compiler:chromium_code" ]
2129 configs += [ "//build/config/compiler:no_chromium_code" ] 2155 configs += [ "//build/config/compiler:no_chromium_code" ]
2130 configs += [ 2156 configs += [
2131 # Note: don't use :internal_config here because this target will get 2157 # Note: don't use :internal_config here because this target will get
2132 # the :external_config applied to it by virtue of depending on :v8, and 2158 # 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
2201 sources = [ 2227 sources = [
2202 "test/fuzzer/wasm-asmjs.cc", 2228 "test/fuzzer/wasm-asmjs.cc",
2203 ] 2229 ]
2204 2230
2205 deps = [ 2231 deps = [
2206 ":fuzzer_support", 2232 ":fuzzer_support",
2207 ] 2233 ]
2208 2234
2209 configs = [ ":internal_config" ] 2235 configs = [ ":internal_config" ]
2210 } 2236 }
OLDNEW
« no previous file with comments | « no previous file | build_overrides/gtest.gni » ('j') | test/unittests/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698