Commit 047490e7 authored by sdefresne's avatar sdefresne Committed by Commit bot

Add bundle_deps to ios_{app,framework}_bundle templates.

Allow to specify dependencies that are only used by the create_bundle
target when using ios_app_bundle or ios_framework_bundle templates to
increase parallelism.

BUG=629867

Review-Url: https://codereview.chromium.org/2169973002
Cr-Commit-Position: refs/heads/master@{#407102}
parent 1fb838fe
......@@ -158,6 +158,7 @@ template("ios_app_bundle") {
forward_variables_from(invoker,
"*",
[
"bundle_deps",
"bundle_extension",
"entitlements_path",
"extra_substitutions",
......@@ -236,6 +237,7 @@ template("ios_app_bundle") {
forward_variables_from(invoker,
"*",
[
"bundle_deps",
"bundle_extension",
"data_deps",
"entitlements_path",
......@@ -379,6 +381,9 @@ template("ios_app_bundle") {
} else {
deps += [ ":$_bundle_data_executable" ]
}
if (defined(invoker.bundle_deps)) {
deps += invoker.bundle_deps
}
if (use_ios_simulator) {
if (!defined(data_deps)) {
......@@ -462,6 +467,9 @@ template("ios_app_bundle") {
if (defined(invoker.product_type)) {
assert(invoker.product_type != "", "mark product_type as used")
}
if (defined(invoker.bundle_deps)) {
assert(invoker.bundle_deps != [], "mark bundle_deps as used")
}
}
set_defaults("ios_app_bundle") {
......
......@@ -244,6 +244,7 @@ template("framework_bundle") {
"*",
[
"assert_no_deps",
"bundle_deps",
"data_deps",
"info_plist",
"output_name",
......@@ -267,6 +268,10 @@ template("framework_bundle") {
":$_target_name($default_toolchain)",
]
}
if (defined(invoker.bundle_deps)) {
assert(invoker.bundle_deps != [], "mark bundle_deps as used")
}
} else {
# If the framework is unversioned, the final _target_name will be the
# create_bundle(_framework_target), otherwise an action with the name
......@@ -299,6 +304,7 @@ template("framework_bundle") {
"*",
[
"assert_no_deps",
"bundle_deps",
"data_deps",
"info_plist",
"output_name",
......@@ -428,6 +434,10 @@ template("framework_bundle") {
}
public_deps += [ ":$_shared_library_bundle_data" ]
if (defined(invoker.bundle_deps)) {
public_deps += invoker.bundle_deps
}
bundle_root_dir = _framework_root_dir
bundle_resources_dir = "$bundle_root_dir/Resources"
bundle_executable_dir = "$bundle_root_dir"
......
......@@ -70,7 +70,7 @@ ios_info_plist("compile_cronet_plist") {
# Bundle plist into Cronet.Framework.
bundle_data("cronet_info_plist") {
deps = [
public_deps = [
":compile_cronet_plist",
]
......@@ -86,13 +86,13 @@ ios_framework_bundle("cronet_framework") {
output_name = "Cronet"
deps = [
":compile_cronet_plist",
":cronet_info_plist",
":cronet_sources",
"//base",
"//net:net",
]
bundle_deps = [ ":cronet_info_plist" ]
libs = [ "UIKit.Framework" ]
public_headers = [
......
......@@ -281,7 +281,7 @@ template("test") {
_resources_bundle_data = target_name + "_resources_bundle_data"
bundle_data(_resources_bundle_data) {
visibility = [ ":*" ]
visibility = [ ":$_test_target" ]
sources = [
"//testing/gtest_ios/Default.png",
]
......@@ -320,12 +320,14 @@ template("test") {
deps = []
}
deps += [
":$_resources_bundle_data",
# All shared libraries must have the sanitizer deps to properly link in
# asan mode (this target will be empty in other cases).
"//build/config/sanitizers:deps",
]
if (!defined(bundle_deps)) {
bundle_deps = []
}
bundle_deps += [ ":$_resources_bundle_data" ]
}
} else {
executable(target_name) {
......
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