Commit 0cd65fc5 authored by Yuke Liao's avatar Yuke Liao Committed by Commit Bot

Reland "Generate frameworks in target_gen_dir instead of root_build_dir."

This reverts commit d16c535e.

Bug: 
Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I978fde2edb396307d896a2027beb04457e5f1972
Reviewed-on: https://chromium-review.googlesource.com/758809Reviewed-by: default avatarSylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Yuke Liao <liaoyuke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#516077}
parent b5e61168
......@@ -1172,10 +1172,8 @@ template("ios_framework_bundle") {
# toolchains when performing a fat build. Use "get_label_info" to construct
# the path since they need to be relative to the default_toolchain.
_default_toolchain_root_out_dir =
get_label_info("$_target_name($default_toolchain)", "root_out_dir")
_default_toolchain_target_gen_dir =
get_label_info("$_target_name($default_toolchain)", "target_gen_dir")
get_label_info(":$_target_name($default_toolchain)", "target_gen_dir")
if (_has_public_headers) {
_framework_headers_target = _target_name + "_framework_headers"
......@@ -1184,7 +1182,7 @@ template("ios_framework_bundle") {
# The link settings are inherited from the framework_bundle config.
cflags = [
"-F",
rebase_path("$_default_toolchain_root_out_dir/.", root_build_dir),
rebase_path("$_default_toolchain_target_gen_dir/.", root_build_dir),
]
}
......@@ -1209,7 +1207,7 @@ template("ios_framework_bundle") {
visibility = [ ":$_target_name" ]
ldflags = [
"-F",
rebase_path("$_default_toolchain_root_out_dir/.", root_build_dir),
rebase_path("$_default_toolchain_target_gen_dir/.", root_build_dir),
]
lib_dirs = [ root_out_dir ]
libs = [ "$_output_name.framework" ]
......@@ -1336,7 +1334,8 @@ template("ios_framework_bundle") {
} else {
if (_has_public_headers) {
_public_headers = invoker.public_headers
_framework_root = "$root_out_dir/$_output_name.framework"
_framework_root =
"$_default_toolchain_target_gen_dir/$_output_name.framework"
_compile_headers_map_target = _target_name + "_compile_headers_map"
action(_compile_headers_map_target) {
......@@ -1439,6 +1438,7 @@ template("ios_framework_bundle") {
]
}
_bundle_data_target_name = _target_name + "+bundle"
create_signed_bundle(_target_name) {
forward_variables_from(invoker,
[
......@@ -1459,6 +1459,7 @@ template("ios_framework_bundle") {
output_name = _output_name
bundle_binary_target = ":$_lipo_shared_library_target"
bundle_binary_output = _output_name
bundle_gen_dir = _default_toolchain_target_gen_dir
# Framework do not have entitlements nor mobileprovision because they use
# the one from the bundle using them (.app or .appex) as they are just
......@@ -1497,7 +1498,7 @@ template("ios_framework_bundle") {
all_dependent_configs += [ ":$_framework_public_config" ]
}
bundle_data(_target_name + "+bundle") {
bundle_data(_bundle_data_target_name) {
forward_variables_from(invoker,
[
"testonly",
......@@ -1507,7 +1508,7 @@ template("ios_framework_bundle") {
":$_target_name",
]
sources = [
"$root_out_dir/$_output_name.framework",
"$_default_toolchain_target_gen_dir/$_output_name.framework",
]
outputs = [
"{{bundle_resources_dir}}/Frameworks/$_output_name.framework",
......@@ -1677,6 +1678,7 @@ template("ios_xctest_bundle") {
output_name = _output_name
bundle_binary_target = ":$_lipo_loadable_module_target"
bundle_binary_output = _output_name
bundle_gen_dir = target_gen_dir
# Test files need to be known to Xcode for proper indexing and discovery
# of tests function for XCTest, but the compilation is done via ninja and
......@@ -1708,7 +1710,7 @@ template("ios_xctest_bundle") {
":$_target_name",
]
sources = [
"$root_out_dir/$_output_name.xctest",
"$target_gen_dir/$_output_name.xctest",
]
outputs = [
"{{bundle_plugins_dir}}/$_output_name.xctest",
......
......@@ -341,8 +341,11 @@ if (additional_toolchains == [] || current_toolchain == default_toolchain) {
}
copy("cronet_package_copy") {
_cronet_framework_gen_dir =
get_label_info(":cronet_framework", "target_gen_dir")
sources = [
"$root_out_dir/Cronet.framework",
"$_cronet_framework_gen_dir/Cronet.framework",
"//AUTHORS",
"//chrome/VERSION",
]
......
......@@ -227,6 +227,7 @@ source_set("test_support") {
public_deps = [
"//build/config/ios:xctest",
"//ios/third_party/earl_grey:earl_grey+link",
"//ios/third_party/ochamcrest:ochamcrest+link",
"//ios/web/public/test/fakes",
"//net:test_support",
]
......
......@@ -305,8 +305,10 @@ if (additional_toolchains == [] || current_toolchain == default_toolchain) {
}
copy("ios_web_view_package_copy") {
_web_view_framework_gen_dir = get_label_info(":web_view", "target_gen_dir")
sources = [
"$root_out_dir/$ios_web_view_output_name.framework",
"$_web_view_framework_gen_dir/$ios_web_view_output_name.framework",
"//AUTHORS",
"//chrome/VERSION",
]
......
......@@ -48,6 +48,7 @@ source_set("earl_grey_test_support") {
public_deps = [
"//build/config/ios:xctest",
"//ios/third_party/earl_grey:earl_grey+link",
"//ios/web_view:web_view+link",
]
libs = [
......
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