Index: ios/web_view/internal/BUILD.gn |
diff --git a/ios/web_view/internal/BUILD.gn b/ios/web_view/internal/BUILD.gn |
index d5f4c6cb1827fd4d9260cb49ee24b78b776a546b..fc8308f72d6e8fb16aa5f0580acbc70433b4c918 100644 |
--- a/ios/web_view/internal/BUILD.gn |
+++ b/ios/web_view/internal/BUILD.gn |
@@ -2,11 +2,28 @@ |
# Use of this source code is governed by a BSD-style license that can be |
# found in the LICENSE file. |
-source_set("internal_arc") { |
- visibility = [ |
- "//ios/web_view", |
- "//ios/web_view/internal/*", |
- ] |
+_deps = [ |
+ "//base", |
+ "//components/pref_registry", |
+ "//components/prefs", |
+ "//components/translate/core/browser", |
+ "//components/translate/core/common", |
+ "//ios/net", |
+ "//ios/web", |
+ "//ios/web:user_agent", |
+ "//ios/web/public/app", |
+ "//ios/web_view/internal/translate", |
+ "//ios/web_view/public", |
+ "//net", |
+ "//net:extras", |
+ "//ui/base", |
+ "//url", |
+] |
+ |
+# An incomplete static library which contains source files with ARC enabled in |
+# //ios/web_view. |
+static_library("web_view_arc_incomplete") { |
+ visibility = [ ":*" ] |
sources = [ |
"criwv_web_view_configuration.mm", |
@@ -14,19 +31,18 @@ source_set("internal_arc") { |
"criwv_website_data_store_internal.h", |
] |
- deps = [ |
- "//ios/web/public/app", |
- "//ios/web_view/public", |
- ] |
+ deps = _deps |
configs += [ "//build/config/compiler:enable_arc" ] |
} |
-source_set("internal") { |
- visibility = [ |
- "//ios/web_view", |
- "//ios/web_view/internal/*", |
- ] |
+# An incomplete static library which contains source files with ARC disabled in |
+# //ios/web_view. |
+# |
+# TODO(crbug.com/690755): Move files in :web_view_non_arch_incomplete to |
+# :web_view_arch_incomplete and delete :web_view_non_arch_incomplete. |
+static_library("web_view_non_arc_incomplete") { |
+ visibility = [ ":*" ] |
sources = [ |
"criwv.mm", |
@@ -46,30 +62,51 @@ source_set("internal") { |
"pref_names.cc", |
"pref_names.h", |
] |
+ |
+ deps = _deps |
+ |
+ allow_circular_includes_from = [ "//ios/web_view/internal/translate" ] |
+} |
+ |
+# A static library which contains all dependencies of :web_view_arc_incomplete |
+# and :web_view_non_arc_incomplete. |
+static_library("deps_complete") { |
+ visibility = [ ":*" ] |
+ complete_static_lib = true |
+ deps = _deps |
+} |
+ |
+# See the comment of //ios/web_view, which is a public alias of this library. |
+# |
+# TODO(crbug.com/689755): Support building a universal binary. |
+action("lib_web_view") { |
+ visibility = [ |
+ "//ios/web_view", |
+ "//ios/web_view/internal/*", |
+ ] |
+ script = "hide_symbols.py" |
deps = [ |
- "//base", |
- "//components/pref_registry", |
- "//components/prefs", |
- "//components/translate/core/browser", |
- "//components/translate/core/common", |
- "//ios/net", |
- "//ios/web", |
- "//ios/web:user_agent", |
- "//ios/web/public/app", |
- "//ios/web_view/internal/translate", |
- "//ios/web_view/public", |
- "//net", |
- "//net:extras", |
- "//ui/base", |
- "//url", |
+ ":deps_complete", |
+ ":web_view_arc_incomplete", |
+ ":web_view_non_arc_incomplete", |
] |
- |
- public_deps = [ |
- ":internal_arc", |
+ outputs = [ |
+ "$target_out_dir/libweb_view.a", |
+ "$target_out_dir/libweb_view.o", |
] |
- |
- allow_circular_includes_from = [ |
- ":internal_arc", |
- "//ios/web_view/internal/translate", |
+ args = [ |
+ "--input_libs", |
+ rebase_path("$target_out_dir/libweb_view_arc_incomplete.a", |
+ root_build_dir) + "," + |
+ rebase_path("$target_out_dir/libweb_view_non_arc_incomplete.a", |
+ root_build_dir), |
+ "--deps_lib", |
+ rebase_path("$target_out_dir/libdeps_complete.a", root_build_dir), |
+ "--output_obj", |
+ rebase_path("$target_out_dir/libweb_view.o", root_build_dir), |
+ "--output_lib", |
+ rebase_path("$target_out_dir/libweb_view.a", root_build_dir), |
+ "--current_cpu", |
+ current_cpu, |
] |
} |