summaryrefslogtreecommitdiff
path: root/libcxx/cmake
diff options
context:
space:
mode:
authorLouis Dionne <ldionne.2@gmail.com>2022-06-30 11:24:43 -0400
committerLouis Dionne <ldionne.2@gmail.com>2022-07-08 16:58:22 -0400
commitbb939931a1adb9a47a2de13c359d6a72aeb277c8 (patch)
treefac166571d86ae1bf79a5e07ba16cdf6b5f8d614 /libcxx/cmake
parentc945bd0da652cd05c0a74898ef5122c2b7a496ef (diff)
downloadllvm-bb939931a1adb9a47a2de13c359d6a72aeb277c8.tar.gz
[libc++] Always build c++experimental.a
This is the first part of a plan to ship experimental features by default while guarding them behind a compiler flag to avoid users accidentally depending on them. Subsequent patches will also encompass incomplete features (such as <format> and <ranges>) in that categorization. Basically, the idea is that we always build and ship the c++experimental library, however users can't use what's in it unless they pass the `-funstable` flag to Clang. Note that this patch intentionally does not start guarding existing <experimental/FOO> content behind the flag, because that would merely break users that might be relying on such content being in the headers unconditionally. Instead, we should start guarding new TSes behind the flag, and get rid of the existing TSes we have by shipping their Standard counterpart. Also, this patch must jump through a few hoops like defining _LIBCPP_ENABLE_EXPERIMENTAL because we still support compilers that do not implement -funstable yet. Differential Revision: https://reviews.llvm.org/D128927
Diffstat (limited to 'libcxx/cmake')
-rw-r--r--libcxx/cmake/caches/AIX.cmake1
-rw-r--r--libcxx/cmake/caches/Apple.cmake1
-rw-r--r--libcxx/cmake/caches/Generic-no-experimental.cmake3
3 files changed, 2 insertions, 3 deletions
diff --git a/libcxx/cmake/caches/AIX.cmake b/libcxx/cmake/caches/AIX.cmake
index b6c483a31727..76cf17791301 100644
--- a/libcxx/cmake/caches/AIX.cmake
+++ b/libcxx/cmake/caches/AIX.cmake
@@ -9,7 +9,6 @@ set(LIBCXX_USE_COMPILER_RT ON CACHE BOOL "")
set(LIBCXX_ENABLE_ASSERTIONS OFF CACHE BOOL "")
set(LIBCXX_ABI_VERSION "1" CACHE STRING "")
set(LIBCXX_ENABLE_ABI_LINKER_SCRIPT OFF CACHE BOOL "")
-set(LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY OFF CACHE BOOL "")
set(LIBCXX_ENABLE_SHARED ON CACHE BOOL "")
set(LIBCXX_ENABLE_STATIC OFF CACHE BOOL "")
set(LIBCXXABI_ENABLE_SHARED ON CACHE BOOL "")
diff --git a/libcxx/cmake/caches/Apple.cmake b/libcxx/cmake/caches/Apple.cmake
index ea701a43f96a..734f5ac8a1b9 100644
--- a/libcxx/cmake/caches/Apple.cmake
+++ b/libcxx/cmake/caches/Apple.cmake
@@ -4,7 +4,6 @@ set(CMAKE_POSITION_INDEPENDENT_CODE OFF CACHE BOOL "")
set(LIBCXX_USE_COMPILER_RT ON CACHE BOOL "")
set(LIBCXX_ENABLE_ASSERTIONS OFF CACHE BOOL "")
set(LIBCXX_ABI_VERSION "1" CACHE STRING "")
-set(LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY OFF CACHE BOOL "")
set(LIBCXX_ENABLE_STATIC ON CACHE BOOL "")
set(LIBCXX_ENABLE_SHARED ON CACHE BOOL "")
set(LIBCXX_CXX_ABI libcxxabi CACHE STRING "")
diff --git a/libcxx/cmake/caches/Generic-no-experimental.cmake b/libcxx/cmake/caches/Generic-no-experimental.cmake
index 0f055f4a98e0..98f01418d197 100644
--- a/libcxx/cmake/caches/Generic-no-experimental.cmake
+++ b/libcxx/cmake/caches/Generic-no-experimental.cmake
@@ -1,2 +1,3 @@
-set(LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY OFF CACHE BOOL "")
+set(LIBCXX_TEST_PARAMS "enable_experimental=False" CACHE STRING "")
+set(LIBCXXABI_TEST_PARAMS "${LIBCXX_TEST_PARAMS}" CACHE STRING "")
set(LIBCXX_ENABLE_INCOMPLETE_FEATURES OFF CACHE BOOL "")