Merge "Remove more namespace pollution."
diff --git a/CleanSpec.mk b/CleanSpec.mk
index 07b3ece..020de69 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -302,6 +302,9 @@
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)
+# Move to libc++ as the default STL.
+$(call add-clean-step, rm -rf $(OUT_DIR))
+
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************
diff --git a/core/build_id.mk b/core/build_id.mk
index 00a691f..f94b224 100644
--- a/core/build_id.mk
+++ b/core/build_id.mk
@@ -18,4 +18,6 @@
# (like "CRB01"). It must be a single word, and is
# capitalized by convention.
-export BUILD_ID=LMP
+BUILD_ID := AOSP
+
+DISPLAY_BUILD_NUMBER := true
diff --git a/core/combo/TARGET_linux-x86_64.mk b/core/combo/TARGET_linux-x86_64.mk
index 27e802f..997ee51 100644
--- a/core/combo/TARGET_linux-x86_64.mk
+++ b/core/combo/TARGET_linux-x86_64.mk
@@ -171,7 +171,8 @@
$(PRIVATE_TARGET_LIBATOMIC) \
$(if $(filter true,$(NATIVE_COVERAGE)),$(PRIVATE_TARGET_LIBGCOV)) \
$(if $(PRIVATE_LIBCXX),,$(PRIVATE_TARGET_LIBGCC)) \
- $(if $(filter true,$(PRIVATE_NO_CRT)),,$(PRIVATE_TARGET_CRTEND_SO_O))
+ $(if $(filter true,$(PRIVATE_NO_CRT)),,$(PRIVATE_TARGET_CRTEND_SO_O)) \
+ $(PRIVATE_LDLIBS)
endef
define transform-o-to-executable-inner
@@ -222,6 +223,5 @@
$(call normalize-target-libraries,$(filter %libcompiler_rt.a,$(PRIVATE_ALL_STATIC_LIBRARIES))) \
$(if $(PRIVATE_LIBCXX),,$(PRIVATE_TARGET_LIBGCC)) \
-Wl,--end-group \
- $(if $(filter true,$(PRIVATE_NO_CRT)),,$(PRIVATE_TARGET_CRTEND_O)) \
- $(PRIVATE_LDLIBS)
+ $(if $(filter true,$(PRIVATE_NO_CRT)),,$(PRIVATE_TARGET_CRTEND_O))
endef
diff --git a/core/cxx_stl_setup.mk b/core/cxx_stl_setup.mk
index c688088..0f574d2 100644
--- a/core/cxx_stl_setup.mk
+++ b/core/cxx_stl_setup.mk
@@ -4,16 +4,14 @@
## Output variables: My_cflags, my_c_includes, my_shared_libraries, etc.
#############################################################
-# Only around for development purposes. Will be removed soon.
-my_libcxx_is_default := false
-
# Select the appropriate C++ STL
ifeq ($(strip $(LOCAL_CXX_STL)),default)
ifndef LOCAL_SDK_VERSION
- ifeq ($(strip $(my_libcxx_is_default)),true)
- # Platform code. Select the appropriate STL.
+ # Platform code. Select the appropriate STL.
+ ifndef USE_MINGW
my_cxx_stl := libc++
else
+ # libc++ is not supported on mingw.
my_cxx_stl := libstdc++
endif
else
@@ -35,7 +33,7 @@
ifdef LOCAL_IS_HOST_MODULE
my_cppflags += -nostdinc++
my_ldflags += -nodefaultlibs
- my_ldlibs += -lc -lm
+ my_ldlibs += -lc -lm -lpthread
endif
else ifneq ($(filter $(my_cxx_stl),stlport stlport_static),)
ifndef LOCAL_IS_HOST_MODULE
diff --git a/core/host_test_internal.mk b/core/host_test_internal.mk
index 8611c4b..072e5e0 100644
--- a/core/host_test_internal.mk
+++ b/core/host_test_internal.mk
@@ -12,10 +12,10 @@
LOCAL_CFLAGS += -DGTEST_HAS_STD_STRING -O0 -g
LOCAL_C_INCLUDES += external/gtest/include
-my_test_libcxx := false
-ifeq (,$(TARGET_BUILD_APPS))
-ifneq ($(filter $(strip $(LOCAL_CXX_STL)),libc++ libc++_static),)
my_test_libcxx := true
+ifeq (,$(TARGET_BUILD_APPS))
+ifneq ($(filter $(strip $(LOCAL_CXX_STL)),bionic stlport stlport_static),)
+my_test_libcxx := false
endif
endif
diff --git a/core/target_test_internal.mk b/core/target_test_internal.mk
index 50f4036..ed011d1 100644
--- a/core/target_test_internal.mk
+++ b/core/target_test_internal.mk
@@ -6,13 +6,12 @@
LOCAL_C_INCLUDES += external/gtest/include
-my_test_libcxx := false
-ifndef LOCAL_SDK_VERSION
-ifeq (,$(TARGET_BUILD_APPS))
-ifneq ($(filter $(strip $(LOCAL_CXX_STL)),libc++ libc++_static),)
my_test_libcxx := true
+ifdef LOCAL_SDK_VERSION
+my_test_libcxx := false
endif
-endif
+ifneq ($(filter $(strip $(LOCAL_CXX_STL)),stlport stlport_static),)
+my_test_libcxx := false
endif
ifeq ($(my_test_libcxx),true)