Index: BUILD.gn |
diff --git a/BUILD.gn b/BUILD.gn |
index 4e8e540349bd175ff37b22ce15d71c3ba66a8067..0ad2539bd86bc1ae14b1b8a67669b7375a2b701a 100644 |
--- a/BUILD.gn |
+++ b/BUILD.gn |
@@ -16,10 +16,13 @@ group("icu") { |
# Shared config used by ICU and all dependents. |
config("icu_config") { |
defines = [ |
+ # Tell ICU to not insert |using namespace icu;| into its headers, |
+ # so that chrome's source explicitly has to use |icu::|. |
"U_USING_ICU_NAMESPACE=0", |
+ |
+ # We don't use ICU plugins and dyload is only necessary for them. |
+ # NaCl-related builds also fail looking for dlfcn.h when it's enabled. |
"U_ENABLE_DYLOAD=0", |
- "UCONFIG_NO_NON_HTML5_CONVERSION=1", |
- "U_CHARSET_IS_UTF8=1", |
] |
if (component_mode != "shared_library") { |
@@ -35,6 +38,17 @@ config("icu_config") { |
# Config used only by ICU code. |
config("icu_code") { |
cflags = [] |
+ defines = [ |
+ "HAVE_DLOPEN=0", |
+ |
+ # Only build encoding coverters and detectors necessary for HTML5. |
+ "UCONFIG_NO_NON_HTML5_CONVERSION=1", |
+ |
+ # No dependency on the default platform encoding. |
+ # Will cut down the code size. |
+ "U_CHARSET_IS_UTF8=1", |
+ ] |
+ |
if (is_win) { |
# Disable some compiler warnings. |
cflags += [ |