summaryrefslogtreecommitdiffstats
path: root/libcxx
diff options
context:
space:
mode:
authorLouis Dionne <ldionne@apple.com>2018-09-26 08:24:51 +0000
committerLouis Dionne <ldionne@apple.com>2018-09-26 08:24:51 +0000
commitf9a52903efa5a32e1d2914d26dbee77a25c7c2a8 (patch)
tree20f3f94893561728aa9a2d925217e1180e85e026 /libcxx
parent95aae4c59d22d5e5583d4dc7a2c92b3ed37591ca (diff)
downloadbcm5719-llvm-f9a52903efa5a32e1d2914d26dbee77a25c7c2a8.tar.gz
bcm5719-llvm-f9a52903efa5a32e1d2914d26dbee77a25c7c2a8.zip
[libc++] Remove Fuchsia-specific knowledge to pick the ABI version
Summary: The ABI version used by libc++ is a configuration option just like any other configuration option. It is a knob that can be used by vendors to customize the libc++ that they ship. As such, we should not be hardcoding vendor-specific configuration choices in libc++. When building libc++ for Fuchsia, Fuchsia's build scripts should simply define the libc++ ABI version to 2 -- this will result in the _LIBCPP_ABI_VERSION macro being defined in the __config header that is generated when libc++ is built and installed, which is the correct way to customize libc++'s behavior for specific vendors. Reviewers: phosek, EricWF Subscribers: mgorny, christof, dexonsmith, cfe-commits, libcxx-commits Differential Revision: https://reviews.llvm.org/D52397 llvm-svn: 343079
Diffstat (limited to 'libcxx')
-rw-r--r--libcxx/CMakeLists.txt9
-rw-r--r--libcxx/include/__config6
2 files changed, 3 insertions, 12 deletions
diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt
index 3eea1bd6836..c87e3562c3a 100644
--- a/libcxx/CMakeLists.txt
+++ b/libcxx/CMakeLists.txt
@@ -111,12 +111,7 @@ cmake_dependent_option(LIBCXX_INSTALL_FILESYSTEM_LIBRARY
"Install libc++fs.a" ON
"LIBCXX_ENABLE_FILESYSTEM;LIBCXX_INSTALL_LIBRARY" OFF)
-if (FUCHSIA)
- set(DEFAULT_ABI_VERSION 2)
-else()
- set(DEFAULT_ABI_VERSION 1)
-endif()
-set(LIBCXX_ABI_VERSION ${DEFAULT_ABI_VERSION} CACHE STRING "ABI version of libc++.")
+set(LIBCXX_ABI_VERSION "1" CACHE STRING "ABI version of libc++. Can be either 1 or 2, where 2 is currently not stable. Defaults to 1.")
option(LIBCXX_ABI_UNSTABLE "Unstable ABI of libc++." OFF)
option(LIBCXX_ABI_FORCE_ITANIUM "Ignore auto-detection and force use of the Itanium ABI.")
option(LIBCXX_ABI_FORCE_MICROSOFT "Ignore auto-detection and force use of the Microsoft ABI.")
@@ -657,7 +652,7 @@ if (LIBCXX_STANDALONE_BUILD)
endif()
# Configuration file flags =====================================================
-if (NOT LIBCXX_ABI_VERSION EQUAL DEFAULT_ABI_VERSION)
+if (NOT LIBCXX_ABI_VERSION EQUAL 1)
config_define(${LIBCXX_ABI_VERSION} _LIBCPP_ABI_VERSION)
endif()
config_define_if(LIBCXX_ABI_UNSTABLE _LIBCPP_ABI_UNSTABLE)
diff --git a/libcxx/include/__config b/libcxx/include/__config
index 2e1eb8d2981..bababbc8f13 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -36,11 +36,7 @@
#define _LIBCPP_VERSION 8000
#ifndef _LIBCPP_ABI_VERSION
-# ifdef __Fuchsia__
-# define _LIBCPP_ABI_VERSION 2
-# else
-# define _LIBCPP_ABI_VERSION 1
-# endif
+# define _LIBCPP_ABI_VERSION 1
#endif
#ifndef _LIBCPP_STD_VER
OpenPOWER on IntegriCloud