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