| Index: build/config/ios/rules.gni
|
| diff --git a/build/config/ios/rules.gni b/build/config/ios/rules.gni
|
| index 9e8b2812820254d892747f4d755d50a00c0bf9a8..2a728be52f90241650d8b245460979457e78566c 100644
|
| --- a/build/config/ios/rules.gni
|
| +++ b/build/config/ios/rules.gni
|
| @@ -6,13 +6,15 @@ import("//build/config/ios/ios_sdk.gni")
|
| import("//build/config/mac/base_rules.gni")
|
| import("//build/config/mac/symbols.gni")
|
|
|
| -_toolchain_suffix = ""
|
| _is_fat_build = additional_toolchains != []
|
| if (_is_fat_build) {
|
| - _toolchain_suffix = "($default_toolchain)"
|
| _is_fat_build_main_target = current_toolchain == default_toolchain
|
| }
|
|
|
| +if (use_ios_simulator || ios_enable_code_signing) {
|
| + _default_entitlements_path = "//build/config/ios/entitlements.plist"
|
| +}
|
| +
|
| # Generates Info.plist files for Mac apps and frameworks.
|
| #
|
| # Arguments
|
| @@ -160,12 +162,10 @@ template("ios_app_bundle") {
|
| # Embeds the entitlements file if building for simulator. This is optional
|
| # with Xcode 7 or older but required with Xcode 8. This is not necessary for
|
| # device build as the entitlement is embedded via the codesigning step.
|
| - #
|
| - # As the generation of the entitlement depends on the
|
| if (use_ios_simulator) {
|
| _generate_entitlements_target = _target_name + "_gen_entitlements"
|
| _generate_entitlements_target_with_toolchain_suffix =
|
| - "$_generate_entitlements_target$_toolchain_suffix"
|
| + "$_generate_entitlements_target($default_toolchain)"
|
|
|
| _generate_entitlements_output =
|
| get_label_info(_generate_entitlements_target_with_toolchain_suffix,
|
| @@ -237,7 +237,7 @@ template("ios_app_bundle") {
|
| _bundle_data_info_plist = target_name + "_bundle_data_info_plist"
|
|
|
| if (use_ios_simulator || ios_enable_code_signing) {
|
| - _entitlements_path = "//build/config/ios/entitlements.plist"
|
| + _entitlements_path = _default_entitlements_path
|
| if (defined(invoker.entitlements_path)) {
|
| _entitlements_path = invoker.entitlements_path
|
| }
|
| @@ -287,8 +287,8 @@ template("ios_app_bundle") {
|
| _generate_entitlements_output,
|
| ]
|
| args = [
|
| - "-e=" + rebase_path(_entitlements_path, root_build_dir),
|
| "generate-entitlements",
|
| + "-e=" + rebase_path(_entitlements_path, root_build_dir),
|
| "-p=" + rebase_path(_info_plist_path, root_build_dir),
|
| ] + rebase_path(outputs, root_build_dir)
|
| }
|
| @@ -539,8 +539,11 @@ template("ios_app_bundle") {
|
| code_signing_outputs = [
|
| "$bundle_root_dir/$_output_name",
|
| "$bundle_root_dir/_CodeSignature/CodeResources",
|
| - "$bundle_root_dir/embedded.mobileprovision",
|
| ]
|
| + if (ios_code_signing_identity != "") {
|
| + code_signing_outputs +=
|
| + [ "$bundle_root_dir/embedded.mobileprovision" ]
|
| + }
|
| if (defined(invoker.extra_system_frameworks)) {
|
| foreach(_framework, invoker.extra_system_frameworks) {
|
| code_signing_outputs += [ "$bundle_root_dir/Frameworks/" +
|
| @@ -548,9 +551,9 @@ template("ios_app_bundle") {
|
| }
|
| }
|
| code_signing_args = [
|
| - "-e=" + rebase_path(_entitlements_path, root_build_dir),
|
| "code-sign-bundle",
|
| "-i=" + ios_code_signing_identity,
|
| + "-e=" + rebase_path(_entitlements_path, root_build_dir),
|
| "-b=" + rebase_path("$target_out_dir/$_output_name", root_build_dir),
|
| rebase_path(bundle_root_dir, root_build_dir),
|
| ]
|
| @@ -914,14 +917,14 @@ template("ios_framework_bundle") {
|
|
|
| if (_has_public_headers) {
|
| configs += [
|
| - ":$_framework_headers_config$_toolchain_suffix",
|
| - ":$_headers_map_config$_toolchain_suffix",
|
| + ":$_framework_headers_config($default_toolchain)",
|
| + ":$_headers_map_config($default_toolchain)",
|
| ]
|
|
|
| if (!defined(deps)) {
|
| deps = []
|
| }
|
| - deps += [ ":$_framework_headers_target$_toolchain_suffix" ]
|
| + deps += [ ":$_framework_headers_target($default_toolchain)" ]
|
| }
|
| }
|
|
|
| @@ -1086,12 +1089,12 @@ template("ios_framework_bundle") {
|
| }
|
|
|
| if (_has_public_headers) {
|
| - configs += [ ":$_headers_map_config$_toolchain_suffix" ]
|
| + configs += [ ":$_headers_map_config($default_toolchain)" ]
|
|
|
| if (!defined(deps)) {
|
| deps = []
|
| }
|
| - deps += [ ":$_framework_headers_target$_toolchain_suffix" ]
|
| + deps += [ ":$_framework_headers_target($default_toolchain)" ]
|
| }
|
| }
|
|
|
| @@ -1274,7 +1277,7 @@ template("ios_framework_bundle") {
|
| deps += [ ":$_link_shared_library_target" ]
|
| }
|
|
|
| - _entitlements_path = "//build/config/ios/entitlements.plist"
|
| + _entitlements_path = _default_entitlements_path
|
| if (defined(invoker.entitlements_path)) {
|
| _entitlements_path = invoker.entitlements_path
|
| }
|
| @@ -1287,12 +1290,15 @@ template("ios_framework_bundle") {
|
| code_signing_outputs = [
|
| "$bundle_root_dir/$_output_name",
|
| "$bundle_root_dir/_CodeSignature/CodeResources",
|
| - "$bundle_root_dir/embedded.mobileprovision",
|
| ]
|
| + if (ios_code_signing_identity != "") {
|
| + code_signing_outputs +=
|
| + [ "$bundle_root_dir/embedded.mobileprovision" ]
|
| + }
|
| code_signing_args = [
|
| - "-e=" + rebase_path(_entitlements_path, root_build_dir),
|
| "code-sign-bundle",
|
| "-i=" + ios_code_signing_identity,
|
| + "-e=" + rebase_path(_entitlements_path, root_build_dir),
|
| "-b=" +
|
| rebase_path("$_shared_library_dir/$_output_name", root_build_dir),
|
| rebase_path(bundle_root_dir, root_build_dir),
|
| @@ -1561,7 +1567,7 @@ template("ios_xctest_test") {
|
| deps += [ ":$_xctest_loadable_module_target" ]
|
| }
|
|
|
| - _entitlements_path = "//build/config/ios/entitlements.plist"
|
| + _entitlements_path = _default_entitlements_path
|
| if (defined(invoker.entitlements_path)) {
|
| _entitlements_path = invoker.entitlements_path
|
| }
|
| @@ -1574,12 +1580,15 @@ template("ios_xctest_test") {
|
| code_signing_outputs = [
|
| "$bundle_root_dir/$_xctest_output",
|
| "$bundle_root_dir/_CodeSignature/CodeResources",
|
| - "$bundle_root_dir/embedded.mobileprovision",
|
| ]
|
| + if (ios_code_signing_identity != "") {
|
| + code_signing_outputs +=
|
| + [ "$bundle_root_dir/embedded.mobileprovision" ]
|
| + }
|
| code_signing_args = [
|
| - "-e=" + rebase_path(_entitlements_path, root_build_dir),
|
| "code-sign-bundle",
|
| "-i=" + ios_code_signing_identity,
|
| + "-e=" + rebase_path(_entitlements_path, root_build_dir),
|
| "-b=" +
|
| rebase_path("$target_out_dir/$_xctest_output", root_build_dir),
|
| rebase_path(bundle_root_dir, root_build_dir),
|
|
|