Switch benchmarks and tests to libc++.

Change-Id: I3b9c8f8c14a1e227e67ae1977cc29b0e8fccef5d
diff --git a/benchmarks/Android.mk b/benchmarks/Android.mk
index 4d7ad96..00250a5 100644
--- a/benchmarks/Android.mk
+++ b/benchmarks/Android.mk
@@ -49,9 +49,8 @@
 LOCAL_MULTILIB := both
 LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
 LOCAL_CFLAGS += $(benchmark_c_flags)
-LOCAL_C_INCLUDES += external/stlport/stlport bionic/ bionic/libstdc++/include
-LOCAL_SHARED_LIBRARIES += libstlport
 LOCAL_SRC_FILES := $(benchmark_src_files)
+LOCAL_CXX_STL := libc++
 include $(BUILD_EXECUTABLE)
 
 ifeq ($(HOST_OS)-$(HOST_ARCH),$(filter $(HOST_OS)-$(HOST_ARCH),linux-x86 linux-x86_64))
diff --git a/tests/Android.build.mk b/tests/Android.build.mk
index d54c851..9562287 100644
--- a/tests/Android.build.mk
+++ b/tests/Android.build.mk
@@ -15,6 +15,7 @@
 #
 
 include $(CLEAR_VARS)
+LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
 
 LOCAL_MODULE := $(module)
 LOCAL_MODULE_TAGS := $(module_tag)
@@ -85,9 +86,13 @@
     $($(module)_ldlibs) \
     $($(module)_ldlibs_$(build_type)) \
 
-ifeq ($(build_type),target)
-  include external/stlport/libstlport.mk
+ifeq ($(LOCAL_FORCE_STATIC_EXECUTABLE),true)
+LOCAL_CXX_STL := libc++_static
+else
+LOCAL_CXX_STL := libc++
+endif
 
+ifeq ($(build_type),target)
   include $(BUILD_$(build_target))
 endif
 
diff --git a/tests/Android.mk b/tests/Android.mk
index 448a8dc..d946d30 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -271,10 +271,10 @@
     libBionicTests \
 
 bionic-unit-tests-static_static_libraries := \
-    libstlport_static \
     libm \
     libc \
-    libstdc++ \
+    libc++_static \
+    libdl \
     libtinyxml2 \
     liblog \
 
diff --git a/tests/stdatomic_test.cpp b/tests/stdatomic_test.cpp
index b7fb19b..eb030bf 100644
--- a/tests/stdatomic_test.cpp
+++ b/tests/stdatomic_test.cpp
@@ -14,8 +14,10 @@
  * limitations under the License.
  */
 
-#include <stdatomic.h>
 #include <gtest/gtest.h>
+// Fool stdatomic.h into not using <atomic>.
+#undef _USING_LIBCXX
+#include <stdatomic.h>
 #include <pthread.h>
 #include <stdint.h>