Additional work on packaging the go/lem tarball
Delete existing symlinks if they're going to be copied
over (necessary for dex2oat).
Update flags to cp to preserve relative symlink. This is necessary for
dalvikvm since ART script determines whether to use a library path for
32-bit or a 64-bit based on the target name of the dalvikvm symlink.
Add dexdump to programs copied to system/bin to trigger test run on
go/lem which does not otherwise detect this CL as changing the build.
Bug: 129332183
Test: Manual inspection of tarball for 32-bit and 64-bit.
Test: Extract tarballs check symlinks valid with symlinks(8).
Test: Check ability to run a sample of golem benchmarks on a local
32-bit test device.
Test: Trial of CL on go/lem.
Change-Id: I24819a36bc7f0370c3778236b5e7f7308f3b48d8
diff --git a/Android.mk b/Android.mk
index 5ead06c..5a3a3db 100644
--- a/Android.mk
+++ b/Android.mk
@@ -533,6 +533,7 @@
bin/dalvikvm \
bin/dex2oat \
bin/dex2oatd \
+ bin/dexdump \
PRIVATE_ART_APEX_DEPENDENCY_LIBS := \
lib/libadbconnectiond.so \
@@ -667,7 +668,7 @@
# - Bionic bootstrap libraries, copied from
# `$(TARGET_OUT)/lib(64)/bootstrap` (the `/system/lib(64)/bootstrap`
# directory to be sync'd to the target);
-# - Some libraries which are part of the ART APEX; if the product
+# - Programs and libraries from the ART APEX; if the product
# to build uses flattened APEXes, these libraries are copied from
# `$(TARGET_OUT)/apex/com.android.art.debug` (the flattened
# (Debug) ART APEX directory to be sync'd to the target);
@@ -679,6 +680,10 @@
#
# This target is only used by Golem now.
#
+# NB Android build does not use cp from:
+# $ANDROID_BUILD_TOP/prebuilts/build-tools/path/{linux-x86,darwin-x86}
+# which has a non-standard set of command-line flags.
+#
# TODO(b/129332183): Remove this when Golem has full support for the
# ART APEX.
.PHONY: standalone-apex-files
@@ -701,12 +706,16 @@
art_apex_orig_dir=$$apex_orig_dir/$(DEBUG_ART_APEX); \
for f in $(PRIVATE_ART_APEX_DEPENDENCY_LIBS) $(PRIVATE_ART_APEX_DEPENDENCY_FILES); do \
tf="$$art_apex_orig_dir/$$f"; \
- if [ -f $$tf ]; then cp -fH $$tf $(TARGET_OUT)/$$f; fi; \
+ df="$(TARGET_OUT)/$$f"; \
+ if [ -f $$tf ]; then \
+ if [ -h $$df ]; then rm $$df; fi; \
+ cp -fd $$tf $$df; \
+ fi; \
done; \
conscrypt_apex_orig_dir=$$apex_orig_dir/$(CONSCRYPT_APEX); \
for f in $(PRIVATE_CONSCRYPT_APEX_DEPENDENCY_LIBS); do \
tf="$$conscrypt_apex_orig_dir/$$f"; \
- if [ -f $$tf ]; then cp -fH $$tf $(TARGET_OUT)/$$f; fi; \
+ if [ -f $$tf ]; then cp -f $$tf $(TARGET_OUT)/$$f; fi; \
done; \
########################################################################