Merge "Real "LOCAL_MULTILIB := both" for prebuilts"
diff --git a/core/combo/HOST_darwin-x86.mk b/core/combo/HOST_darwin-x86.mk
index d665c76..4a2bfe3 100644
--- a/core/combo/HOST_darwin-x86.mk
+++ b/core/combo/HOST_darwin-x86.mk
@@ -49,7 +49,7 @@
 
 # gcc location for clang; to be updated when clang is updated
 # HOST_TOOLCHAIN_ROOT is a Darwin-specific define
-HOST_TOOLCHAIN_FOR_CLANG := $(HOST_TOOLCHAIN_ROOT)
+$(combo_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG := $($(combo_2nd_arch_prefix)HOST_TOOLCHAIN_ROOT)
 
 $(combo_2nd_arch_prefix)HOST_AR := $(AR)
 
diff --git a/core/config.mk b/core/config.mk
index 287944e..b7f779e 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -524,6 +524,8 @@
   TARGET_DEFAULT_JAVA_LIBRARIES := core core-junit ext framework framework2
 endif
 
+TARGET_CPU_SMP ?= true
+
 # Flags for DEX2OAT
 DEX2OAT_TARGET_ARCH := $(TARGET_ARCH)
 DEX2OAT_TARGET_CPU_VARIANT := $(TARGET_CPU_VARIANT)
diff --git a/core/host_test_internal.mk b/core/host_test_internal.mk
index 650b9c6..426c400 100644
--- a/core/host_test_internal.mk
+++ b/core/host_test_internal.mk
@@ -5,7 +5,11 @@
 LOCAL_CFLAGS += -DGTEST_OS_LINUX -DGTEST_HAS_STD_STRING -O0 -g
 LOCAL_C_INCLUDES +=  external/gtest/include
 
+ifneq ($(filter libc++,$(LOCAL_SHARED_LIBRARIES)),)
+LOCAL_STATIC_LIBRARIES += libgtest_libc++_host libgtest_main_libc++_host
+else
 LOCAL_STATIC_LIBRARIES += libgtest_host libgtest_main_host
 LOCAL_SHARED_LIBRARIES +=
+endif
 
 LOCAL_LDLIBS += -lpthread
diff --git a/core/target_test_internal.mk b/core/target_test_internal.mk
index 7b99678..49ea518 100644
--- a/core/target_test_internal.mk
+++ b/core/target_test_internal.mk
@@ -5,6 +5,9 @@
 LOCAL_CFLAGS += -DGTEST_OS_LINUX_ANDROID -DGTEST_HAS_STD_STRING
 
 LOCAL_C_INCLUDES += external/gtest/include
+ifneq ($(filter libc++,$(LOCAL_SHARED_LIBRARIES)),)
+LOCAL_STATIC_LIBRARIES += libgtest_libc++ libgtest_main_libc++
+else
 LOCAL_STATIC_LIBRARIES += libgtest libgtest_main
 
 ifndef LOCAL_SDK_VERSION
@@ -14,6 +17,7 @@
 LOCAL_SHARED_LIBRARIES += libstlport
 LOCAL_STATIC_LIBRARIES += libstdc++
 endif
+endif
 
 ifndef LOCAL_MODULE_PATH
 LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_NATIVE_TESTS)/$(LOCAL_MODULE)