Commit 1b943e22 authored by Amr Aboelkher's avatar Amr Aboelkher Committed by Commit Bot

Revert "[ios] Update application extension rpath"

This reverts commit 7f416325.

Reason for revert: the ios-simulator-cronet builder is failing because of that change

Original change's description:
> [ios] Update application extension rpath
> 
> As application extension may share private frameworks with the app
> they are bundled in, the rpath needs to look both in the extension
> private frameworks and the app private frameworks.
> 
> Bug: none
> Change-Id: I5686d20d8e3f131929ec14caa932bda18bf7d517
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2201096
> Reviewed-by: David Jean <djean@chromium.org>
> Reviewed-by: Javier Ernesto Flores Robles <javierrobles@chromium.org>
> Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#768745}

TBR=sdefresne@chromium.org,javierrobles@chromium.org,djean@chromium.org

Change-Id: Ie83c0aca04c83581ef9bd0bcbff992d9449cc0d1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: none
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2201601Reviewed-by: default avatarAmr Aboelkher <amraboelkher@google.com>
Commit-Queue: Amr Aboelkher <amraboelkher@google.com>
Cr-Commit-Position: refs/heads/master@{#768759}
parent 34a86095
......@@ -512,10 +512,13 @@ template("ios_info_plist") {
# entitlements (must generate a single file as output); cannot be
# defined if entitlements_path is set.
#
# bundle_extension:
# (optional) bundle extension including the dot, default to ".app".
#
# product_type
# (optional) string, product type for the generated Xcode project,
# default to "com.apple.product-type.application". Should only be
# overriden when building application extension.
# default to "com.apple.product-type.application". Should generally
# not be overridden.
#
# enable_code_signing
# (optional) boolean, control whether code signing is enabled or not,
......@@ -630,25 +633,6 @@ template("ios_app_bundle") {
"target_out_dir") + "/$_output_name.xcent"
}
_app_product_type = "com.apple.product-type.application"
_appex_product_type = "com.apple.product-type.app-extension"
not_needed([ "_appex_product_type" ])
_product_type = _app_product_type
if (defined(invoker.product_type)) {
_product_type = invoker.product_type
}
if (_product_type == _app_product_type) {
_bundle_extension = ".app"
} else if (_product_type == _appex_product_type) {
_bundle_extension = ".appex"
} else {
assert(false, "unknown product_type \"$product_type\" for $_target_name")
}
_is_app_framework = _product_type == _app_product_type
executable(_arch_executable_target) {
forward_variables_from(invoker,
"*",
......@@ -698,18 +682,6 @@ template("ios_app_bundle") {
"2",
]
# Application extension may share private frameworks with the application
# itself, so they need to look in both their own bundle and the surrounding
# app bundle for the frameworks.
if (!_is_app_framework) {
ldflags += [
"-Xlinker",
"-rpath",
"-Xlinker",
"@executable_path/../../Frameworks",
]
}
if (use_ios_simulator) {
deps += [ ":$_generate_entitlements_target($default_toolchain)" ]
......@@ -820,8 +792,24 @@ template("ios_app_bundle") {
}
}
# Only write PkgInfo for real application, not application extension.
if (_is_app_framework) {
_app_product_type = "com.apple.product-type.application"
_product_type = _app_product_type
if (defined(invoker.product_type)) {
_product_type = invoker.product_type
}
_app_bundle_extension = ".app"
_bundle_extension = _app_bundle_extension
if (defined(invoker.bundle_extension)) {
_bundle_extension = invoker.bundle_extension
}
# Only write PkgInfo for real application, not application extension (they
# have the same product type but a different extension).
_write_pkg_info = _product_type == _app_product_type &&
_bundle_extension == _app_bundle_extension
if (_write_pkg_info) {
_create_pkg_info = target_name + "_pkg_info"
action(_create_pkg_info) {
forward_variables_from(invoker, [ "testonly" ])
......@@ -887,7 +875,7 @@ template("ios_app_bundle") {
if (!defined(bundle_deps)) {
bundle_deps = []
}
if (_is_app_framework) {
if (_write_pkg_info) {
bundle_deps += [ ":$_bundle_data_pkg_info" ]
}
bundle_deps += _variant.bundle_deps
......@@ -962,6 +950,7 @@ template("ios_appex_bundle") {
"bundle_extension",
"product_type",
])
bundle_extension = ".appex"
product_type = "com.apple.product-type.app-extension"
# Add linker flags required for an application extension (determined by
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment