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_overrides/v8.gni") |
6 import("//third_party/icu/config.gni") | 7 import("//third_party/icu/config.gni") |
7 import("v8.gni") | 8 import("v8.gni") |
8 | 9 |
9 declare_args() { | 10 declare_args() { |
10 # Sets the test isolation mode (noop|prepare|check). | 11 # Sets the test isolation mode (noop|prepare|check). |
11 v8_test_isolation_mode = "noop" | 12 v8_test_isolation_mode = "noop" |
12 } | 13 } |
13 | 14 |
14 template("v8_isolate_run") { | 15 template("v8_isolate_run") { |
| 16 forward_variables_from(invoker, "*", [ "deps", "isolate" ]) |
| 17 |
15 # Remember target name as within the action scope the target name will be | 18 # Remember target name as within the action scope the target name will be |
16 # different. | 19 # different. |
17 name = target_name | 20 name = target_name |
18 if (name != "" && invoker.isolate != "" && invoker.deps != [] && | 21 |
19 v8_test_isolation_mode != "noop") { | 22 assert(defined(invoker.deps)) |
| 23 assert(defined(invoker.isolate)) |
| 24 |
| 25 if (name != "" && v8_test_isolation_mode != "noop") { |
20 action(name + "_run") { | 26 action(name + "_run") { |
21 testonly = true | 27 testonly = true |
22 | 28 |
23 deps = invoker.deps | 29 deps = invoker.deps |
24 | 30 |
25 script = "//tools/isolate_driver.py" | 31 script = "//tools/isolate_driver.py" |
26 | 32 |
27 sources = [ | 33 sources = [ |
28 invoker.isolate, | 34 invoker.isolate, |
29 ] | 35 ] |
(...skipping 49 matching lines...) Loading... |
79 if (is_component_build) { | 85 if (is_component_build) { |
80 component = "shared_library" | 86 component = "shared_library" |
81 } else { | 87 } else { |
82 component = "static_library" | 88 component = "static_library" |
83 } | 89 } |
84 if (icu_use_data_file) { | 90 if (icu_use_data_file) { |
85 icu_use_data_file_flag = "1" | 91 icu_use_data_file_flag = "1" |
86 } else { | 92 } else { |
87 icu_use_data_file_flag = "0" | 93 icu_use_data_file_flag = "0" |
88 } | 94 } |
| 95 if (v8_enable_inspector_override) { |
| 96 enable_inspector = "1" |
| 97 } else { |
| 98 enable_inspector = "0" |
| 99 } |
89 if (v8_use_external_startup_data) { | 100 if (v8_use_external_startup_data) { |
90 use_external_startup_data = "1" | 101 use_external_startup_data = "1" |
91 } else { | 102 } else { |
92 use_external_startup_data = "0" | 103 use_external_startup_data = "0" |
93 } | 104 } |
94 if (v8_use_snapshot) { | 105 if (v8_use_snapshot) { |
95 use_snapshot = "true" | 106 use_snapshot = "true" |
96 } else { | 107 } else { |
97 use_snapshot = "false" | 108 use_snapshot = "false" |
98 } | 109 } |
99 if (v8_has_valgrind) { | 110 if (v8_has_valgrind) { |
100 has_valgrind = "1" | 111 has_valgrind = "1" |
101 } else { | 112 } else { |
102 has_valgrind = "0" | 113 has_valgrind = "0" |
103 } | 114 } |
104 if (v8_gcmole) { | 115 if (v8_gcmole) { |
105 gcmole = "1" | 116 gcmole = "1" |
106 } else { | 117 } else { |
107 gcmole = "0" | 118 gcmole = "0" |
108 } | 119 } |
109 | 120 |
110 | |
111 # Note, all paths will be rebased in isolate_driver.py to be relative to | 121 # Note, all paths will be rebased in isolate_driver.py to be relative to |
112 # the isolate file. | 122 # the isolate file. |
113 args = [ | 123 args = [ |
114 v8_test_isolation_mode, | 124 v8_test_isolation_mode, |
115 "--isolated", | 125 "--isolated", |
116 rebase_path("$root_out_dir/$name.isolated", root_build_dir), | 126 rebase_path("$root_out_dir/$name.isolated", root_build_dir), |
117 "--isolate", | 127 "--isolate", |
118 rebase_path(invoker.isolate, root_build_dir), | 128 rebase_path(invoker.isolate, root_build_dir), |
119 | 129 |
120 # Path variables are used to replace file paths when loading a .isolate | 130 # Path variables are used to replace file paths when loading a .isolate |
(...skipping 14 matching lines...) Loading... |
135 "asan=$asan", | 145 "asan=$asan", |
136 "--config-variable", | 146 "--config-variable", |
137 "cfi_vptr=$cfi_vptr", | 147 "cfi_vptr=$cfi_vptr", |
138 "--config-variable", | 148 "--config-variable", |
139 "gcmole=$gcmole", | 149 "gcmole=$gcmole", |
140 "--config-variable", | 150 "--config-variable", |
141 "has_valgrind=$has_valgrind", | 151 "has_valgrind=$has_valgrind", |
142 "--config-variable", | 152 "--config-variable", |
143 "icu_use_data_file_flag=$icu_use_data_file_flag", | 153 "icu_use_data_file_flag=$icu_use_data_file_flag", |
144 "--config-variable", | 154 "--config-variable", |
| 155 "is_gn=1", |
| 156 "--config-variable", |
145 "msan=$msan", | 157 "msan=$msan", |
146 "--config-variable", | 158 "--config-variable", |
147 "tsan=$tsan", | 159 "tsan=$tsan", |
148 "--config-variable", | 160 "--config-variable", |
149 "coverage=0", | 161 "coverage=0", |
150 "--config-variable", | 162 "--config-variable", |
151 "sanitizer_coverage=0", | 163 "sanitizer_coverage=0", |
152 "--config-variable", | 164 "--config-variable", |
153 "component=$component", | 165 "component=$component", |
154 "--config-variable", | 166 "--config-variable", |
155 "target_arch=$target_arch", | 167 "target_arch=$target_arch", |
156 "--config-variable", | 168 "--config-variable", |
| 169 "v8_enable_inspector=$enable_inspector", |
| 170 "--config-variable", |
157 "v8_use_external_startup_data=$use_external_startup_data", | 171 "v8_use_external_startup_data=$use_external_startup_data", |
158 "--config-variable", | 172 "--config-variable", |
159 "v8_use_snapshot=$use_snapshot", | 173 "v8_use_snapshot=$use_snapshot", |
160 ] | 174 ] |
161 | 175 |
162 if (is_win) { | 176 if (is_win) { |
163 args += [ | 177 args += [ |
164 "--config-variable", | 178 "--config-variable", |
165 "msvs_version=2013", | 179 "msvs_version=2013", |
166 ] | 180 ] |
167 } else { | 181 } else { |
168 args += [ | 182 args += [ |
169 "--config-variable", | 183 "--config-variable", |
170 "msvs_version=0", | 184 "msvs_version=0", |
171 ] | 185 ] |
172 } | 186 } |
173 } | 187 } |
174 } | 188 } |
175 } | 189 } |
OLD | NEW |