Chromium Code Reviews| Index: build/config/ios/rules.gni |
| diff --git a/build/config/ios/rules.gni b/build/config/ios/rules.gni |
| index d6413633829f6fa4be14ab248815c75d75f5c1b7..e526dec17b90ffa70d43289800b70b40f2ee6918 100644 |
| --- a/build/config/ios/rules.gni |
| +++ b/build/config/ios/rules.gni |
| @@ -420,6 +420,17 @@ template("ios_app_bundle") { |
| _output_name = invoker.output_name |
| } |
| + # TODO(sdefresne): some target downstream manually pack an PkgInfo, so |
| + # allow controlling the generation of the PkgInfo file via an undocumented |
| + # parameter until they are fixed. |
| + _write_pkg_info = false |
| + if (defined(invoker.write_pkg_info)) { |
| + _write_pkg_info = invoker.write_pkg_info |
| + } |
| + |
| + assert(_write_pkg_info || !_write_pkg_info, |
| + "prevents 'Assignment had no effect.' errors") |
| + |
| _arch_executable_source = _target_name + "_arch_executable_sources" |
| _arch_executable_target = _target_name + "_arch_executable" |
| _lipo_executable_target = _target_name + "_executable" |
| @@ -634,6 +645,35 @@ template("ios_app_bundle") { |
| ] |
| } |
| + if (_write_pkg_info) { |
| + _create_pkg_info = target_name + "_pkg_info" |
| + action(_create_pkg_info) { |
| + forward_variables_from(invoker, [ "testonly" ]) |
| + script = "//build/config/mac/write_pkg_info.py" |
| + sources = get_target_outputs(":$_generate_info_plist") |
| + outputs = [ |
| + "$target_gen_dir/$target_name", |
|
rohitrao (ping after 24h)
2016/12/09 12:14:42
Why is the output of this step not a file named Pk
sdefresne
2016/12/09 13:50:19
$target_gen_dir does not depends on the current ta
rohitrao (ping after 24h)
2016/12/09 13:51:51
Nope, it was just unexpected. Perhaps summarize w
|
| + ] |
| + args = [ "--plist" ] + rebase_path(sources, root_build_dir) + |
| + [ "--output" ] + rebase_path(outputs, root_build_dir) |
| + deps = [ |
| + ":$_generate_info_plist", |
| + ] |
| + } |
| + |
| + _bundle_data_pkg_info = target_name + "_bundle_data_pkg_info" |
| + bundle_data(_bundle_data_pkg_info) { |
| + forward_variables_from(invoker, [ "testonly" ]) |
| + sources = get_target_outputs(":$_create_pkg_info") |
| + outputs = [ |
| + "{{bundle_resources_dir}}/PkgInfo", |
| + ] |
| + public_deps = [ |
| + ":$_create_pkg_info", |
| + ] |
| + } |
| + } |
| + |
| create_signed_bundle(_target_name) { |
| forward_variables_from(invoker, |
| [ |
| @@ -661,6 +701,9 @@ template("ios_app_bundle") { |
| bundle_deps = [] |
| } |
| bundle_deps += [ ":$_bundle_data_info_plist" ] |
| + if (_write_pkg_info) { |
| + bundle_deps += [ ":$_bundle_data_pkg_info" ] |
| + } |
| if (use_ios_simulator) { |
| if (!defined(data_deps)) { |