OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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/ios/ios_sdk.gni") | 5 import("//build/config/ios/ios_sdk.gni") |
6 import("//build/config/mac/base_rules.gni") | 6 import("//build/config/mac/base_rules.gni") |
7 import("//build/config/mac/symbols.gni") | 7 import("//build/config/mac/symbols.gni") |
8 import("//build/toolchain/toolchain.gni") | 8 import("//build/toolchain/toolchain.gni") |
9 | 9 |
10 # Invokes lipo on multiple arch-specific binaries to create a fat binary. | 10 # Invokes lipo on multiple arch-specific binaries to create a fat binary. |
(...skipping 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1263 # (Debug, Release, ...). In addition, the symbols visibility is configured to | 1263 # (Debug, Release, ...). In addition, the symbols visibility is configured to |
1264 # private by default. To simplify testing with those constraints, our tests are | 1264 # private by default. To simplify testing with those constraints, our tests are |
1265 # compiled in the TEST_HOST target instead of the .xctest bundle. | 1265 # compiled in the TEST_HOST target instead of the .xctest bundle. |
1266 template("ios_xctest_test") { | 1266 template("ios_xctest_test") { |
1267 _target_name = target_name | 1267 _target_name = target_name |
1268 _output_name = target_name | 1268 _output_name = target_name |
1269 if (defined(invoker.output_name)) { | 1269 if (defined(invoker.output_name)) { |
1270 _output_name = invoker.output_name | 1270 _output_name = invoker.output_name |
1271 } | 1271 } |
1272 | 1272 |
1273 # TODO(crbug.com/662404): Remove when downstream have been changed to use | 1273 # TODO(crbug.com/662404): Remove when all downstream uses has been removed. |
1274 # the new name for the xctest app bundles. | 1274 # If the variable is overridden, assert that it is true as all uses should |
1275 _use_new_naming_convention = false | 1275 # have set it to true (otherwise changing the default would break things). |
1276 if (defined(invoker.use_new_naming_convention)) { | 1276 if (defined(invoker.use_new_naming_convention)) { |
1277 _use_new_naming_convention = invoker.use_new_naming_convention | 1277 assert(invoker.use_new_naming_convention, |
| 1278 "use_new_naming_convention must be true if defined.") |
1278 } | 1279 } |
1279 | 1280 |
1280 if (_use_new_naming_convention) { | 1281 _xctest_target = _target_name + "_module" |
1281 _xctest_target = _target_name + "_module" | 1282 _xctest_output = _output_name + "_module" |
1282 _xctest_output = _output_name + "_module" | |
1283 | 1283 |
1284 _host_target = _target_name | 1284 _host_target = _target_name |
1285 _host_output = _output_name | 1285 _host_output = _output_name |
1286 } else { | |
1287 _xctest_target = _target_name | |
1288 _xctest_output = _output_name | |
1289 | |
1290 _host_target = _target_name + "_host" | |
1291 _host_output = _output_name + "_host" | |
1292 } | |
1293 | 1286 |
1294 _xctest_arch_loadable_module_target = _xctest_target + "_arch_loadable_module" | 1287 _xctest_arch_loadable_module_target = _xctest_target + "_arch_loadable_module" |
1295 _xctest_lipo_loadable_module_target = _xctest_target + "_loadable_module" | 1288 _xctest_lipo_loadable_module_target = _xctest_target + "_loadable_module" |
1296 | 1289 |
1297 loadable_module(_xctest_arch_loadable_module_target) { | 1290 loadable_module(_xctest_arch_loadable_module_target) { |
1298 visibility = [ ":$_xctest_lipo_loadable_module_target($default_toolchain)" ] | 1291 visibility = [ ":$_xctest_lipo_loadable_module_target($default_toolchain)" ] |
1299 if (current_toolchain != default_toolchain) { | 1292 if (current_toolchain != default_toolchain) { |
1300 visibility += [ ":$_xctest_target" ] | 1293 visibility += [ ":$_xctest_target" ] |
1301 } | 1294 } |
1302 | 1295 |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1428 "-rpath", | 1421 "-rpath", |
1429 "-Xlinker", | 1422 "-Xlinker", |
1430 "@loader_path/Frameworks", | 1423 "@loader_path/Frameworks", |
1431 ] | 1424 ] |
1432 } | 1425 } |
1433 } | 1426 } |
1434 | 1427 |
1435 set_defaults("ios_xctest_test") { | 1428 set_defaults("ios_xctest_test") { |
1436 configs = default_executable_configs | 1429 configs = default_executable_configs |
1437 } | 1430 } |
OLD | NEW |