Have Golem generate ICU .dat files in /system/etc/icu on target.
Have Golem target build rule (`build-art-target-golem`) build target
`icu-data-art-test`, copying ICU .dat prebuilt files into
/system/etc/icu, so that they can be found even if the Runtime APEX is
not available, by setting the environment variable
`ART_TEST_ANDROID_RUNTIME_ROOT` to "$ANDROID_ROOT" (i.e. "/system") in
the `art` script on device.
This is a temporary change needed until Golem fully supports the
Runtime APEX.
Test: Rely on Golem.
Bug: 121117762
Bug: 119293618
Bug: 113373927
Change-Id: I0342e863eb2354b277b56f346c71e0624b556dec
diff --git a/Android.mk b/Android.mk
index a2d8f64..54c96ab 100644
--- a/Android.mk
+++ b/Android.mk
@@ -488,6 +488,15 @@
.PHONY: build-art-target-golem
# Also include libartbenchmark, we always include it when running golem.
# libstdc++ is needed when building for ART_TARGET_LINUX.
+#
+# Also include a copy of the ICU .dat prebuilt files in
+# /system/etc/icu on target (see module `icu-data-art-test`), so that
+# it can found even if the Runtime APEX is not available, by setting
+# the environment variable `ART_TEST_ANDROID_RUNTIME_ROOT` to
+# "/system" on device. This is a temporary change needed until both
+# the ART Buildbot and Golem fully support the Runtime APEX.
+# TODO(b/121117762): Remove this when the ART Buildbot and Golem have
+# full support for the Runtime APEX.
ART_TARGET_SHARED_LIBRARY_BENCHMARK := $(TARGET_OUT_SHARED_LIBRARIES)/libartbenchmark.so
build-art-target-golem: dex2oat dalvikvm linker libstdc++ \
$(TARGET_OUT_EXECUTABLES)/art \
@@ -496,7 +505,8 @@
$(ART_TARGET_SHARED_LIBRARY_DEPENDENCIES) \
$(ART_TARGET_SHARED_LIBRARY_BENCHMARK) \
$(TARGET_CORE_IMG_OUT_BASE).art \
- $(TARGET_CORE_IMG_OUT_BASE)-interpreter.art
+ $(TARGET_CORE_IMG_OUT_BASE)-interpreter.art \
+ icu-data-art-test
# remove debug libraries from public.libraries.txt because golem builds
# won't have it.
sed -i '/libartd.so/d' $(TARGET_OUT)/etc/public.libraries.txt