Index: components/cronet/android/BUILD.gn |
diff --git a/components/cronet/android/BUILD.gn b/components/cronet/android/BUILD.gn |
index 528f481ad3e97c9e2d021aea72f93bbc2ffea9dc..1bc583c0fdd68cc30087e580a68e31f202edfae4 100644 |
--- a/components/cronet/android/BUILD.gn |
+++ b/components/cronet/android/BUILD.gn |
@@ -8,6 +8,7 @@ import("//build/config/android/rules.gni") |
import("//build/util/version.gni") |
import("//chrome/version.gni") |
import("//testing/test.gni") |
+import("//url/features.gni") |
assert(!is_component_build, "Cronet requires static library build.") |
@@ -15,6 +16,11 @@ declare_args() { |
cronet_enable_data_reduction_proxy_support = false |
} |
+buildflag_header("features") { |
+ header = "features.h" |
+ flags = [ "USE_PLATFORM_ICU_ALTERNATIVES=$use_platform_icu_alternatives" ] |
+} |
+ |
generate_jni("cronet_jni_headers") { |
sources = [ |
"java/src/org/chromium/net/ChromiumUrlRequest.java", |
@@ -115,6 +121,7 @@ template("cronet_static_tmpl") { |
":chromium_url_request_java", |
":cronet_jni_headers", |
":cronet_version_header", |
+ ":features", |
"//base", |
"//base:i18n", |
"//base/third_party/dynamic_annotations", |
@@ -186,42 +193,22 @@ template("cronet_static_tmpl") { |
} |
} |
-# cronet_static_small target has reduced binary size through using |
-# ICU alternatives which requires file and ftp support be disabled. |
-cronet_static_tmpl("cronet_static_small") { |
- defines = [ |
- "USE_ICU_ALTERNATIVES_ON_ANDROID=1", |
- "DISABLE_FILE_SUPPORT=1", |
- "DISABLE_FTP_SUPPORT=1", |
- ] |
- |
- deps = [ |
- "//net:net_small", |
- "//url:url_lib_use_icu_alternatives_on_android", |
- ] |
- |
- if (cronet_enable_data_reduction_proxy_support) { |
- deps += [ |
- "//components/data_reduction_proxy/core/browser:browser_small", |
- "//components/data_reduction_proxy/core/common:common_small", |
- ] |
- } |
-} |
- |
-# cronet_static target depends on ICU and includes file and ftp support. |
cronet_static_tmpl("cronet_static") { |
deps = [ |
- "//base:i18n", |
"//net", |
"//url", |
] |
if (cronet_enable_data_reduction_proxy_support) { |
deps += [ |
- "//components/data_reduction_proxy/core/browser", |
+ "//components/data_reduction_proxy/core/browser:browser_small", |
"//components/data_reduction_proxy/core/common", |
] |
} |
+ |
+ if (!use_platform_icu_alternatives) { |
+ deps += [ "//base:i18n" ] |
+ } |
} |
shared_library("cronet") { |
@@ -229,9 +216,9 @@ shared_library("cronet") { |
"cronet_jni.cc", |
] |
deps = [ |
- ":cronet_static_small", |
+ ":cronet_static", |
"//base", |
- "//net:net_small", |
+ "//net:net", |
] |
ldflags = [ "-Wl,--version-script=" + |
rebase_path("//components/cronet/android/only_jni_exports.lst") ] |
@@ -465,7 +452,7 @@ shared_library("cronet_tests") { |
configs -= [ "//build/config/android:hide_native_jni_exports" ] |
if (cronet_enable_data_reduction_proxy_support) { |
- deps += [ "//components/data_reduction_proxy/core/browser" ] |
+ deps += [ "//components/data_reduction_proxy/core/browser:browser_small" ] |
} |
} |