Index: ios/web_view/BUILD.gn |
diff --git a/ios/web_view/BUILD.gn b/ios/web_view/BUILD.gn |
index fbc8174e39c58fbf31018eed22b319993fc01c25..9158cdde0b682835340c3fc26ed26e5bdd33c51a 100644 |
--- a/ios/web_view/BUILD.gn |
+++ b/ios/web_view/BUILD.gn |
@@ -95,7 +95,6 @@ ios_web_view_sources = [ |
ios_web_view_sources += ios_web_view_public_headers |
ios_web_view_deps = [ |
- ":generate_license", |
":packed_resources", |
"//base", |
"//components/flags_ui", |
@@ -228,22 +227,81 @@ bundle_data("packed_resources") { |
] |
} |
-action("generate_license") { |
- _license_path = "$target_out_dir/LICENSE" |
+if (additional_toolchains == [] || current_toolchain == default_toolchain) { |
+ _package_dir = "$root_out_dir/cronet_ios_web_view" |
- script = "//tools/licenses.py" |
- inputs = [ |
- "//buildtools/$host_os/gn", |
- ] |
- outputs = [ |
- _license_path, |
- ] |
- args = [ |
- "license_file", |
- rebase_path(_license_path, root_build_dir), |
- "--gn-target", |
- "//ios/web_view", |
- "--gn-out-dir", |
- ".", |
- ] |
+ action("cronet_ios_web_view_generate_license") { |
+ _license_path = "$_package_dir/LICENSE" |
+ |
+ script = "//tools/licenses.py" |
+ inputs = [ |
+ "//buildtools/$host_os/gn", |
+ ] |
+ outputs = [ |
+ _license_path, |
+ ] |
+ args = [ |
+ "license_file", |
+ rebase_path(_license_path, root_build_dir), |
+ "--gn-target", |
+ "//ios/web_view", |
+ "--gn-out-dir", |
+ ".", |
+ ] |
+ } |
+ |
+ copy("cronet_ios_web_view_package_copy") { |
+ sources = [ |
+ "$root_out_dir/CronetChromeWebView.framework", |
+ "//AUTHORS", |
+ "//chrome/VERSION", |
+ ] |
+ outputs = [ |
+ "$_package_dir/{{source_file_part}}", |
+ ] |
+ |
+ deps = [ |
+ ":cronet_web_view_combined", |
+ ] |
+ } |
+ |
+ if (enable_dsyms) { |
+ action("cronet_ios_web_view_dsym_archive") { |
+ script = "//chrome/tools/build/mac/archive_symbols.py" |
+ |
+ # These are the dSYMs that will be archived. The sources list must be |
+ # the target outputs that correspond to the dSYMs (since a dSYM is a |
+ # directory it cannot be listed as a source file). The targets that |
+ # generate both the dSYM and binary image are listed in deps. |
+ _dsyms = [ "$root_out_dir/CronetChromeWebView.dSYM" ] |
+ |
+ sources = [ |
+ "$root_out_dir/CronetChromeWebView.framework", |
+ ] |
+ |
+ _output = "$_package_dir/CronetChromeWebView.dSYM.tar.bz2" |
+ |
+ outputs = [ |
+ _output, |
+ ] |
+ |
+ args = [ rebase_path(_output, root_out_dir) ] + |
+ rebase_path(_dsyms, root_out_dir) |
+ |
+ deps = [ |
+ ":cronet_web_view_combined", |
+ ] |
+ } |
+ } else { |
+ group("cronet_ios_web_view_dsym_archive") { |
+ } |
+ } |
+ |
+ group("cronet_ios_web_view_package") { |
+ deps = [ |
+ ":cronet_ios_web_view_dsym_archive", |
+ ":cronet_ios_web_view_generate_license", |
+ ":cronet_ios_web_view_package_copy", |
+ ] |
+ } |
} |