| 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 | 9 |
| 9 # 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. |
| 10 # | 11 # |
| 11 # Arguments | 12 # Arguments |
| 12 # | 13 # |
| 13 # arch_binary_target | 14 # arch_binary_target |
| 14 # name of the target generating the arch-specific binaries, they must | 15 # name of the target generating the arch-specific binaries, they must |
| 15 # be named $target_out_dir/$toolchain_cpu/$arch_binary_output. | 16 # be named $target_out_dir/$toolchain_cpu/$arch_binary_output. |
| 16 # | 17 # |
| 17 # arch_binary_output | 18 # arch_binary_output |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 _toolchain = _all_toolchains[_index] | 69 _toolchain = _all_toolchains[_index] |
| 69 _index = _index + 1 | 70 _index = _index + 1 |
| 70 | 71 |
| 71 inputs += | 72 inputs += |
| 72 [ get_label_info("$_arch_binary_target($_toolchain)", | 73 [ get_label_info("$_arch_binary_target($_toolchain)", |
| 73 "target_out_dir") + "/$_cpu/$_arch_binary_output" ] | 74 "target_out_dir") + "/$_cpu/$_arch_binary_output" ] |
| 74 | 75 |
| 75 deps += [ "$_arch_binary_target($_toolchain)" ] | 76 deps += [ "$_arch_binary_target($_toolchain)" ] |
| 76 } | 77 } |
| 77 | 78 |
| 78 args = [ | 79 args = [] |
| 79 "xcrun", | 80 if (!use_system_xcode) { |
| 80 "lipo", | 81 args += [ |
| 81 "-create", | 82 "--developer_dir", |
| 82 "-output", | 83 hermetic_xcode_path, |
| 83 rebase_path("$target_out_dir/$_output_name", root_build_dir), | 84 ] |
| 84 ] + rebase_path(inputs, root_build_dir) | 85 } |
| 86 args += [ |
| 87 "xcrun", |
| 88 "lipo", |
| 89 "-create", |
| 90 "-output", |
| 91 rebase_path("$target_out_dir/$_output_name", root_build_dir), |
| 92 ] + rebase_path(inputs, root_build_dir) |
| 85 | 93 |
| 86 if (enable_dsyms) { | 94 if (enable_dsyms) { |
| 87 _dsyms_output_dir = "$root_out_dir/$_output_name.dSYM" | 95 _dsyms_output_dir = "$root_out_dir/$_output_name.dSYM" |
| 88 outputs += [ | 96 outputs += [ |
| 89 "$_dsyms_output_dir/", | 97 "$_dsyms_output_dir/", |
| 90 "$_dsyms_output_dir/Contents/Info.plist", | 98 "$_dsyms_output_dir/Contents/Info.plist", |
| 91 "$_dsyms_output_dir/Contents/Resources/DWARF/$_output_name", | 99 "$_dsyms_output_dir/Contents/Resources/DWARF/$_output_name", |
| 92 ] | 100 ] |
| 93 args += [ "-Wcrl,dsym," + rebase_path("$root_out_dir/.", root_build_dir) ] | 101 args += [ "-Wcrl,dsym," + rebase_path("$root_out_dir/.", root_build_dir) ] |
| 94 } | 102 } |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 code_signing_outputs += [ "$_bundle_root_dir/embedded.mobileprovision" ] | 235 code_signing_outputs += [ "$_bundle_root_dir/embedded.mobileprovision" ] |
| 228 } | 236 } |
| 229 | 237 |
| 230 if (defined(invoker.extra_system_frameworks)) { | 238 if (defined(invoker.extra_system_frameworks)) { |
| 231 foreach(_framework, invoker.extra_system_frameworks) { | 239 foreach(_framework, invoker.extra_system_frameworks) { |
| 232 code_signing_outputs += [ "$bundle_root_dir/Frameworks/" + | 240 code_signing_outputs += [ "$bundle_root_dir/Frameworks/" + |
| 233 get_path_info(_framework, "file") ] | 241 get_path_info(_framework, "file") ] |
| 234 } | 242 } |
| 235 } | 243 } |
| 236 | 244 |
| 237 code_signing_args = [ | 245 code_signing_args = [] |
| 246 if (!use_system_xcode) { |
| 247 code_signing_args += [ |
| 248 "--developer_dir", |
| 249 hermetic_xcode_path, |
| 250 ] |
| 251 } |
| 252 code_signing_args += [ |
| 238 "code-sign-bundle", | 253 "code-sign-bundle", |
| 239 "-t=" + ios_sdk_name, | 254 "-t=" + ios_sdk_name, |
| 240 "-i=" + ios_code_signing_identity, | 255 "-i=" + ios_code_signing_identity, |
| 241 "-e=" + rebase_path(_entitlements_path, root_build_dir), | 256 "-e=" + rebase_path(_entitlements_path, root_build_dir), |
| 242 "-b=" + rebase_path("$target_out_dir/$_output_name", root_build_dir), | 257 "-b=" + rebase_path("$target_out_dir/$_output_name", root_build_dir), |
| 243 rebase_path(bundle_root_dir, root_build_dir), | 258 rebase_path(bundle_root_dir, root_build_dir), |
| 244 ] | 259 ] |
| 245 if (!_enable_code_signing) { | 260 if (!_enable_code_signing) { |
| 246 code_signing_args += [ "--disable-code-signature" ] | 261 code_signing_args += [ "--disable-code-signature" ] |
| 247 } | 262 } |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 deps = [ | 552 deps = [ |
| 538 ":$_generate_info_plist", | 553 ":$_generate_info_plist", |
| 539 ] | 554 ] |
| 540 sources = [ | 555 sources = [ |
| 541 _entitlements_path, | 556 _entitlements_path, |
| 542 _info_plist_path, | 557 _info_plist_path, |
| 543 ] | 558 ] |
| 544 outputs = [ | 559 outputs = [ |
| 545 _generate_entitlements_output, | 560 _generate_entitlements_output, |
| 546 ] | 561 ] |
| 547 args = [ | 562 |
| 548 "generate-entitlements", | 563 args = [] |
| 549 "-e=" + rebase_path(_entitlements_path, root_build_dir), | 564 if (!use_system_xcode) { |
| 550 "-p=" + rebase_path(_info_plist_path, root_build_dir), | 565 args += [ |
| 551 ] + rebase_path(outputs, root_build_dir) | 566 "--developer_dir", |
| 567 hermetic_xcode_path, |
| 568 ] |
| 569 } |
| 570 args += [ |
| 571 "generate-entitlements", |
| 572 "-e=" + rebase_path(_entitlements_path, root_build_dir), |
| 573 "-p=" + rebase_path(_info_plist_path, root_build_dir), |
| 574 ] + rebase_path(outputs, root_build_dir) |
| 552 } | 575 } |
| 553 } | 576 } |
| 554 | 577 |
| 555 _bundle_data_info_plist = target_name + "_bundle_data_info_plist" | 578 _bundle_data_info_plist = target_name + "_bundle_data_info_plist" |
| 556 bundle_data(_bundle_data_info_plist) { | 579 bundle_data(_bundle_data_info_plist) { |
| 557 forward_variables_from(invoker, [ "testonly" ]) | 580 forward_variables_from(invoker, [ "testonly" ]) |
| 558 | 581 |
| 559 sources = get_target_outputs(":$_generate_info_plist") | 582 sources = get_target_outputs(":$_generate_info_plist") |
| 560 outputs = [ | 583 outputs = [ |
| 561 "{{bundle_root_dir}}/Info.plist", | 584 "{{bundle_root_dir}}/Info.plist", |
| (...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1342 "-rpath", | 1365 "-rpath", |
| 1343 "-Xlinker", | 1366 "-Xlinker", |
| 1344 "@loader_path/Frameworks", | 1367 "@loader_path/Frameworks", |
| 1345 ] | 1368 ] |
| 1346 } | 1369 } |
| 1347 } | 1370 } |
| 1348 | 1371 |
| 1349 set_defaults("ios_xctest_test") { | 1372 set_defaults("ios_xctest_test") { |
| 1350 configs = default_executable_configs | 1373 configs = default_executable_configs |
| 1351 } | 1374 } |
| OLD | NEW |