summaryrefslogtreecommitdiff
path: root/libcxx/CMakeLists.txt
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/CMakeLists.txt
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/CMakeLists.txt')
-rw-r--r--libcxx/CMakeLists.txt10
1 files changed, 1 insertions, 9 deletions
diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt
index 3d63bb0c8fbf..0977a7229e5d 100644
--- a/libcxx/CMakeLists.txt
+++ b/libcxx/CMakeLists.txt
@@ -55,7 +55,6 @@ option(LIBCXX_ENABLE_ASSERTIONS
by users in their own code regardless of this option." OFF)
option(LIBCXX_ENABLE_SHARED "Build libc++ as a shared library." ON)
option(LIBCXX_ENABLE_STATIC "Build libc++ as a static library." ON)
-option(LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY "Build libc++experimental.a" ON)
set(ENABLE_FILESYSTEM_DEFAULT ON)
if (WIN32 AND NOT MINGW)
# Filesystem is buildable for windows, but it requires __int128 helper
@@ -167,9 +166,6 @@ cmake_dependent_option(LIBCXX_INSTALL_STATIC_LIBRARY
cmake_dependent_option(LIBCXX_INSTALL_SHARED_LIBRARY
"Install the shared libc++ library." ON
"LIBCXX_ENABLE_SHARED;LIBCXX_INSTALL_LIBRARY" OFF)
-cmake_dependent_option(LIBCXX_INSTALL_EXPERIMENTAL_LIBRARY
- "Install libc++experimental.a" ON
- "LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY;LIBCXX_INSTALL_LIBRARY" OFF)
option(LIBCXX_ABI_UNSTABLE "Use the unstable ABI of libc++. This is equivalent to specifying LIBCXX_ABI_VERSION=n, where n is the not-yet-stable version." OFF)
if (LIBCXX_ABI_UNSTABLE)
@@ -930,11 +926,7 @@ add_subdirectory(include)
add_subdirectory(src)
add_subdirectory(utils)
-set(LIBCXX_TEST_DEPS "")
-
-if (LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY)
- list(APPEND LIBCXX_TEST_DEPS cxx_experimental)
-endif()
+set(LIBCXX_TEST_DEPS "cxx_experimental")
if (LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY)
list(APPEND LIBCXX_TEST_DEPS cxx_external_threads)