Fix art-host rule and art script after build changes.

Change-Id: Ideb6a83d71cda126d94ad01965b2dcf5005d449a
diff --git a/tools/art b/tools/art
index e3f409c..cc5c867 100755
--- a/tools/art
+++ b/tools/art
@@ -42,17 +42,28 @@
   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=$?