Merge "Disable gnu style linker hash for NDK builds."
diff --git a/core/dex_preopt_libart.mk b/core/dex_preopt_libart.mk
index d064e8c..ae2c586 100644
--- a/core/dex_preopt_libart.mk
+++ b/core/dex_preopt_libart.mk
@@ -16,7 +16,9 @@
 DEX2OATD_DEPENDENCY := $(DEX2OAT_DEPENDENCY)
 DEX2OATD_DEPENDENCY += $(DEX2OATD)
 
-PRELOADED_CLASSES := frameworks/base/preloaded-classes
+# Use the first preloaded-classes file in PRODUCT_COPY_FILES.
+PRELOADED_CLASSES := $(call word-colon,1,$(firstword \
+    $(filter %system/etc/preloaded-classes,$(PRODUCT_COPY_FILES))))
 
 # Default to debug version to help find bugs.
 # Set USE_DEX2OAT_DEBUG to false for only building non-debug versions.
diff --git a/core/target_test_internal.mk b/core/target_test_internal.mk
index ed011d1..f8a9f04 100644
--- a/core/target_test_internal.mk
+++ b/core/target_test_internal.mk
@@ -6,25 +6,10 @@
 
 LOCAL_C_INCLUDES += external/gtest/include
 
-my_test_libcxx := true
-ifdef LOCAL_SDK_VERSION
-my_test_libcxx := false
-endif
-ifneq ($(filter $(strip $(LOCAL_CXX_STL)),stlport stlport_static),)
-my_test_libcxx := false
-endif
-
-ifeq ($(my_test_libcxx),true)
-LOCAL_STATIC_LIBRARIES += libgtest_libc++ libgtest_main_libc++
-else
-LOCAL_STATIC_LIBRARIES += libgtest libgtest_main
-
 ifndef LOCAL_SDK_VERSION
-LOCAL_C_INCLUDES += bionic \
-                    bionic/libstdc++/include \
-                    external/stlport/stlport
-LOCAL_SHARED_LIBRARIES += libstlport libstdc++
-endif
+LOCAL_STATIC_LIBRARIES += libgtest libgtest_main
+else
+LOCAL_STATIC_LIBRARIES += libgtest_ndk libgtest_main_ndk
 endif
 
 ifdef LOCAL_MODULE_PATH
diff --git a/envsetup.sh b/envsetup.sh
index d39a2f1..66f9136 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -1638,9 +1638,17 @@
     local secs=$(($tdiff % 60))
     echo
     if [ $ret -eq 0 ] ; then
-        echo -n -e "#### make completed successfully "
+        if [ $(uname) != "Darwin" ]; then
+            echo -n -e "\e[0;32m#### make completed successfully "
+        else
+            echo -n -e "#### make completed successfully "
+        fi
     else
-        echo -n -e "#### make failed to build some targets "
+        if [ $(uname) != "Darwin" ]; then
+            echo -n -e "\e[0;31m#### make failed to build some targets "
+        else
+            echo -n -e "#### make failed to build some targets "
+        fi
     fi
     if [ $hours -gt 0 ] ; then
         printf "(%02g:%02g:%02g (hh:mm:ss))" $hours $mins $secs
@@ -1649,13 +1657,13 @@
     elif [ $secs -gt 0 ] ; then
         printf "(%s seconds)" $secs
     fi
-    echo -e " ####"
+    if [ $(uname) != "Darwin" ]; then
+        echo -e " ####\e[00m"
+    fi
     echo
     return $ret
 }
 
-
-
 if [ "x$SHELL" != "x/bin/bash" ]; then
     case `ps -o command -p $$` in
         *bash*)
diff --git a/target/product/base.mk b/target/product/base.mk
index 9713330..6387fda 100644
--- a/target/product/base.mk
+++ b/target/product/base.mk
@@ -115,4 +115,8 @@
     wm
 
 
+PRODUCT_COPY_FILES := $(call add-to-product-copy-files-if-exists,\
+    frameworks/base/preloaded-classes:system/etc/preloaded-classes)
+
+
 $(call inherit-product, $(SRC_TARGET_DIR)/product/embedded.mk)