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