summaryrefslogtreecommitdiff
path: root/NativeCode.bp
diff options
context:
space:
mode:
authorVictor Chang <vichang@google.com>2018-11-26 17:26:39 +0000
committerVictor Chang <vichang@google.com>2019-01-02 11:57:10 +0000
commite05511a36debf8f5e5ee1b1c4a4551c5e4ec91de (patch)
tree27d13185095004c9138a5c0d1ca8dad81d6bbdb6 /NativeCode.bp
parent485930ee1dc9674abdeb44c6bebf44f215c25112 (diff)
Whitelist libcore to build against libicuuc and libicui18n directly
JNI code for core-libart (libjavacore) and core-oj (libopenjdk) are in the runtime APEX. We want them to use libicuuc and libicui18n contained within the runtime APEX, rather than calling ICU4C via the limited subset shim library that the APEX provides to platform components outside of the APEX. Whitelist the libs by adding -DANDROID_LINK_SHARED_ICU4C. Without it, external/icu/android_icu4c/include/uconfig_local.h would prevent compilation. Bug: 117094880 Test: m checkbuild Change-Id: Ie1aaa0be3710a9a39bc20b630171b3c1915fc770
Diffstat (limited to 'NativeCode.bp')
-rw-r--r--NativeCode.bp18
1 files changed, 18 insertions, 0 deletions
diff --git a/NativeCode.bp b/NativeCode.bp
index 8dfbe4f759..64d6cdf7b6 100644
--- a/NativeCode.bp
+++ b/NativeCode.bp
@@ -67,6 +67,16 @@ cc_library_shared {
static_libs: [
"libziparchive",
],
+ target: {
+ android: {
+ cflags: [
+ // -DANDROID_LINK_SHARED_ICU4C to enable access to the full ICU4C.
+ // See external/icu/android_icu4c/include/uconfig_local.h
+ // for more information.
+ "-DANDROID_LINK_SHARED_ICU4C",
+ ],
+ },
+ },
}
cc_defaults {
@@ -108,6 +118,14 @@ cc_defaults {
"-D__GLIBC__",
],
},
+ android: {
+ cflags: [
+ // -DANDROID_LINK_SHARED_ICU4C to enable access to the full ICU4C.
+ // See external/icu/android_icu4c/include/uconfig_local.h
+ // for more information.
+ "-DANDROID_LINK_SHARED_ICU4C",
+ ],
+ },
},
notice: "ojluni/NOTICE",