ifeq ($(HOST_PREFER_32_BIT),true)
art-host: $(HOST_OUT_EXECUTABLES)/art $(HOST_OUT)/bin/dalvikvm32 $(HOST_OUT)/lib/libart.so $(HOST_OUT)/bin/dex2oat $(HOST_CORE_IMG_OUT) $(HOST_OUT)/lib/libjavacore.so $(HOST_OUT)/bin/dalvikvm
else
-art-host: $(HOST_OUT_EXECUTABLES)/art $(HOST_OUT)/bin/dalvikvm64 $(HOST_OUT)/bin/dalvikvm32 $(HOST_OUT)/lib/libart.so $(HOST_OUT)/bin/dex2oat $(HOST_CORE_IMG_OUT) $(HOST_OUT)/lib/libjavacore.so $(HOST_OUT)/bin/dalvikvm
+art-host: $(HOST_OUT_EXECUTABLES)/art $(HOST_OUT)/bin/dalvikvm64 $(HOST_OUT)/bin/dalvikvm32 $(HOST_OUT)/lib/libart.so $(HOST_OUT)/bin/dex2oat $(HOST_CORE_IMG_OUT) $(HOST_OUT)/lib/libjavacore.so $(HOST_OUT)/lib64/libjavacore.so $(HOST_OUT)/bin/dalvikvm
endif
.PHONY: art-host-debug
echo "$file"
}
+DALVIKVM_EXECUTABLE=$ANDROID_HOST_OUT/bin/dalvikvm
+
+function find_libdir() {
+ if [ "$(readlink "$DALVIKVM_EXECUTABLE")" = "dalvikvm64" ]; then
+ echo "lib64"
+ else
+ echo "lib"
+ fi
+}
+
PROG_NAME="$(follow_links "$BASH_SOURCE")"
PROG_DIR="$(cd "${PROG_NAME%/*}" ; pwd -P)"
ANDROID_BUILD_TOP="$(cd "${PROG_DIR}/../../../../" ; pwd -P)/"
ANDROID_HOST_OUT=$PROG_DIR/..
ANDROID_DATA=$PWD/android-data$$
+LD_LIBRARY_PATH=$ANDROID_HOST_OUT/"$(find_libdir)"
mkdir -p $ANDROID_DATA/dalvik-cache/{x86,x86_64}
ANDROID_DATA=$ANDROID_DATA \
ANDROID_ROOT=$ANDROID_HOST_OUT \
- LD_LIBRARY_PATH=$ANDROID_HOST_OUT/lib \
- $invoke_with $ANDROID_HOST_OUT/bin/dalvikvm $lib \
+ LD_LIBRARY_PATH=$LD_LIBRARY_PATH \
+ $invoke_with $DALVIKVM_EXECUTABLE $lib \
-Ximage:$ANDROID_HOST_OUT/framework/core.art \
"$@"
EXIT_STATUS=$?