aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Android.bp6
-rw-r--r--include/libxml/xmlversion.h7
2 files changed, 12 insertions, 1 deletions
diff --git a/Android.bp b/Android.bp
index 01fc87b9..3d395065 100644
--- a/Android.bp
+++ b/Android.bp
@@ -34,6 +34,9 @@
cc_library {
name: "libxml2",
vendor_available: true,
+ vndk: {
+ enabled: true,
+ },
host_supported: true,
srcs: [
"SAX.c",
@@ -94,6 +97,9 @@ cc_library {
host: {
host_ldlibs: ["-ldl"],
},
+ vendor: {
+ exclude_shared_libs: ["libicuuc"],
+ },
},
shared_libs: ["libicuuc"],
export_shared_lib_headers: ["libicuuc"],
diff --git a/include/libxml/xmlversion.h b/include/libxml/xmlversion.h
index c8163c61..eb18ea0c 100644
--- a/include/libxml/xmlversion.h
+++ b/include/libxml/xmlversion.h
@@ -286,9 +286,14 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
* LIBXML_ICU_ENABLED:
*
* Whether icu support is available
+ *
+ * This is disabled when libxml2 is built for the VNDK.
+ * libicuuc.so isn't available in the VNDK.
*/
-#if 1
+#ifndef __ANDROID_VNDK__
#define LIBXML_ICU_ENABLED
+#else
+#undef LIBXML_ICU_ENABLED
#endif
/**