Skip to content

Commit 87f64bb

Browse files
committed
[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.
1 parent b6bb9dc commit 87f64bb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

libcxx/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ function(cxx_add_basic_build_flags target)
499499
# Use C++23 for all targets.
500500
set_target_properties(${target} PROPERTIES
501501
CXX_STANDARD 23
502-
CXX_STANDARD_REQUIRED OFF # TODO: Make this REQUIRED once we don't need to accommodate the LLVM documentation builders using an ancient CMake
502+
CXX_STANDARD_REQUIRED ON
503503
CXX_EXTENSIONS NO)
504504

505505
# When building the dylib, don't warn for unavailable aligned allocation

libcxxabi/src/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ set_target_properties(cxxabi_shared_objects
181181
PROPERTIES
182182
CXX_EXTENSIONS OFF
183183
CXX_STANDARD 23
184-
CXX_STANDARD_REQUIRED OFF # TODO: Make this REQUIRED once we don't need to accommodate the LLVM documentation builders using an ancient CMake
184+
CXX_STANDARD_REQUIRED ON
185185
COMPILE_FLAGS "${LIBCXXABI_COMPILE_FLAGS}"
186186
DEFINE_SYMBOL ""
187187
)
@@ -280,7 +280,7 @@ set_target_properties(cxxabi_static_objects
280280
PROPERTIES
281281
CXX_EXTENSIONS OFF
282282
CXX_STANDARD 23
283-
CXX_STANDARD_REQUIRED OFF # TODO: Make this REQUIRED once we don't need to accommodate the LLVM documentation builders using an ancient CMake
283+
CXX_STANDARD_REQUIRED ON
284284
COMPILE_FLAGS "${LIBCXXABI_COMPILE_FLAGS}"
285285
)
286286
target_compile_options(cxxabi_static_objects PRIVATE "${LIBCXXABI_ADDITIONAL_COMPILE_FLAGS}")

0 commit comments

Comments
 (0)