[libcxx-commits] [libcxx] [libcxxabi] [libc++] Strictly enforce C++ language requirements. (PR #130501)
Mark de Wever via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Mar 9 11:21:55 PDT 2025
https://github.com/mordante created https://github.com/llvm/llvm-project/pull/130501
This was disabled for documentation bots. Testing whether that is still required. Compiling the dylib with a language standard before C++23 does not work, so it would be good when this can be enforced by CMake.
>From 87f64bb23cb78013c109efba615b0bad38c65e70 Mon Sep 17 00:00:00 2001
From: Mark de Wever <koraq at xs4all.nl>
Date: Sun, 9 Mar 2025 19:18:53 +0100
Subject: [PATCH] [libc++] Strictly enforce C++ language requirements.
This was disabled for documentation bots. Testing whether that is still
required. Compiling the dylib with a language standard before C++23 does
not work, so it would be good when this can be enforced by CMake.
---
libcxx/CMakeLists.txt | 2 +-
libcxxabi/src/CMakeLists.txt | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt
index abe12c2805a7c..d40abaf18dd4a 100644
--- a/libcxx/CMakeLists.txt
+++ b/libcxx/CMakeLists.txt
@@ -499,7 +499,7 @@ function(cxx_add_basic_build_flags target)
# Use C++23 for all targets.
set_target_properties(${target} PROPERTIES
CXX_STANDARD 23
- CXX_STANDARD_REQUIRED OFF # TODO: Make this REQUIRED once we don't need to accommodate the LLVM documentation builders using an ancient CMake
+ CXX_STANDARD_REQUIRED ON
CXX_EXTENSIONS NO)
# When building the dylib, don't warn for unavailable aligned allocation
diff --git a/libcxxabi/src/CMakeLists.txt b/libcxxabi/src/CMakeLists.txt
index 0a6fc892a4f69..256c87427d746 100644
--- a/libcxxabi/src/CMakeLists.txt
+++ b/libcxxabi/src/CMakeLists.txt
@@ -181,7 +181,7 @@ set_target_properties(cxxabi_shared_objects
PROPERTIES
CXX_EXTENSIONS OFF
CXX_STANDARD 23
- CXX_STANDARD_REQUIRED OFF # TODO: Make this REQUIRED once we don't need to accommodate the LLVM documentation builders using an ancient CMake
+ CXX_STANDARD_REQUIRED ON
COMPILE_FLAGS "${LIBCXXABI_COMPILE_FLAGS}"
DEFINE_SYMBOL ""
)
@@ -280,7 +280,7 @@ set_target_properties(cxxabi_static_objects
PROPERTIES
CXX_EXTENSIONS OFF
CXX_STANDARD 23
- CXX_STANDARD_REQUIRED OFF # TODO: Make this REQUIRED once we don't need to accommodate the LLVM documentation builders using an ancient CMake
+ CXX_STANDARD_REQUIRED ON
COMPILE_FLAGS "${LIBCXXABI_COMPILE_FLAGS}"
)
target_compile_options(cxxabi_static_objects PRIVATE "${LIBCXXABI_ADDITIONAL_COMPILE_FLAGS}")
More information about the libcxx-commits
mailing list