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
diff --git a/NativeCode.bp b/NativeCode.bp
index 8dfbe4f..64d6cdf 100644
--- a/NativeCode.bp
+++ b/NativeCode.bp
@@ -67,6 +67,16 @@
     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 @@
                 "-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",