| Index: components/cronet/ios/BUILD.gn
|
| diff --git a/components/cronet/ios/BUILD.gn b/components/cronet/ios/BUILD.gn
|
| index 716fa0b47ef7212d96362b7236a846d969a6b4b2..e612d070f0eab47412d13ae1161690ee8b9b2ca6 100644
|
| --- a/components/cronet/ios/BUILD.gn
|
| +++ b/components/cronet/ios/BUILD.gn
|
| @@ -32,34 +32,38 @@ process_version("cronet_version_header") {
|
| ]
|
| }
|
|
|
| +_cronet_deps = [
|
| + ":cronet_version_header",
|
| + ":generate_accept_languages",
|
| + "//base:base",
|
| + "//components/grpc_support",
|
| + "//components/metrics:metrics",
|
| + "//components/metrics/proto:proto",
|
| + "//components/prefs:prefs",
|
| + "//ios/net:net",
|
| + "//ios/web:user_agent",
|
| + "//net",
|
| + "//url",
|
| +]
|
| +
|
| +_cronet_sources = [
|
| + "../histogram_manager.cc",
|
| + "../histogram_manager.h",
|
| + "../stale_host_resolver.cc",
|
| + "../stale_host_resolver.h",
|
| + "../url_request_context_config.cc",
|
| + "../url_request_context_config.h",
|
| + "Cronet.h",
|
| + "Cronet.mm",
|
| + "cronet_c_for_grpc.h",
|
| + "cronet_environment.h",
|
| + "cronet_environment.mm",
|
| +]
|
| +
|
| source_set("cronet_sources") {
|
| - deps = [
|
| - ":cronet_version_header",
|
| - ":generate_accept_languages",
|
| - "//base:base",
|
| - "//components/grpc_support",
|
| - "//components/metrics:metrics",
|
| - "//components/metrics/proto:proto",
|
| - "//components/prefs:prefs",
|
| - "//ios/net:net",
|
| - "//ios/web:user_agent",
|
| - "//net",
|
| - "//url",
|
| - ]
|
| + deps = _cronet_deps
|
|
|
| - sources = [
|
| - "../histogram_manager.cc",
|
| - "../histogram_manager.h",
|
| - "../stale_host_resolver.cc",
|
| - "../stale_host_resolver.h",
|
| - "../url_request_context_config.cc",
|
| - "../url_request_context_config.h",
|
| - "Cronet.h",
|
| - "Cronet.mm",
|
| - "cronet_c_for_grpc.h",
|
| - "cronet_environment.h",
|
| - "cronet_environment.mm",
|
| - ]
|
| + sources = _cronet_sources
|
|
|
| include_dirs = [ "//components/grpc_support/include" ]
|
|
|
| @@ -137,6 +141,71 @@ action("generate_accept_languages") {
|
| ]
|
| }
|
|
|
| +# A static library which contains just _cronet_sources.
|
| +static_library("cronet_static") {
|
| + deps = _cronet_deps
|
| +
|
| + sources = _cronet_sources
|
| +
|
| + visibility = [ ":*" ]
|
| +
|
| + include_dirs = [ "//components/grpc_support/include" ]
|
| +
|
| + public_deps = [
|
| + "//components/grpc_support",
|
| + ]
|
| +
|
| + public_headers = [
|
| + "Cronet.h",
|
| + "cronet_c_for_grpc.h",
|
| + ]
|
| + public_headers += grpc_public_headers
|
| +}
|
| +
|
| +# A static library which contains all dependencies of :cronet_static.
|
| +static_library("cronet_deps_complete") {
|
| + visibility = [ ":*" ]
|
| + complete_static_lib = true
|
| + deps = [
|
| + ":cronet_static",
|
| + ]
|
| +}
|
| +
|
| +# A static library which contains cronet and all dependendencies hidden inside.
|
| +action("cronet_hide") {
|
| + script = "//components/cronet/tools/hide_symbols.py"
|
| + deps = [
|
| + ":cronet_deps_complete",
|
| + ":cronet_static",
|
| + ]
|
| + outputs = [
|
| + "$target_out_dir/$current_cpu/libcronet_hide.a",
|
| + ]
|
| + args = [
|
| + "--input_libs",
|
| + rebase_path("$target_out_dir/libcronet_static.a", root_build_dir),
|
| + "--deps_lib",
|
| + rebase_path("$target_out_dir/libcronet_deps_complete.a", root_build_dir),
|
| + "--output_obj",
|
| + rebase_path("$target_out_dir/$current_cpu/libcronet_hide.o",
|
| + root_build_dir),
|
| + "--output_lib",
|
| + rebase_path("$target_out_dir/$current_cpu/libcronet_hide.a",
|
| + root_build_dir),
|
| + "--current_cpu",
|
| + current_cpu,
|
| + ]
|
| +}
|
| +
|
| +# A fat static library which exports cronet public symbols and hides all dependendencies.
|
| +lipo_binary("libcronet") {
|
| + arch_binary_target = ":cronet_hide"
|
| + arch_binary_output = "libcronet_hide.a"
|
| + output_name = "libcronet.a"
|
| + enable_stripping = false
|
| + enable_dsyms = false
|
| +}
|
| +
|
| if (additional_toolchains == [] || current_toolchain == default_toolchain) {
|
| _package_dir = "$root_out_dir/cronet"
|
|
|
| @@ -163,6 +232,7 @@ if (additional_toolchains == [] || current_toolchain == default_toolchain) {
|
| copy("cronet_package_copy") {
|
| sources = [
|
| "$root_out_dir/Cronet.framework",
|
| + "$target_out_dir/libcronet.a",
|
| "//AUTHORS",
|
| "//chrome/VERSION",
|
| ]
|
| @@ -172,6 +242,7 @@ if (additional_toolchains == [] || current_toolchain == default_toolchain) {
|
|
|
| deps = [
|
| ":cronet_framework",
|
| + ":libcronet",
|
| ]
|
| }
|
|
|
|
|