Skip to content

Commit 14dbd4b

Browse files
var-consttru
authored andcommitted
[CMake] Use LLVM_ENABLE_ASSERTIONS to enable the hardened mode in libc++.
Use the new libc++ hardened mode instead of the deprecated safe mode. Reviewed By: benlangmuir Differential Revision: https://reviews.llvm.org/D156377 (cherry picked from commit 194e2ba)
1 parent 726f698 commit 14dbd4b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/cmake/modules/HandleLLVMOptions.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ if( LLVM_ENABLE_ASSERTIONS )
8585
endif()
8686
# Enable assertions in libstdc++.
8787
add_compile_definitions(_GLIBCXX_ASSERTIONS)
88-
# Enable assertions in libc++.
89-
add_compile_definitions(_LIBCPP_ENABLE_ASSERTIONS)
88+
# Enable the hardened mode in libc++.
89+
add_compile_definitions(_LIBCPP_ENABLE_HARDENED_MODE)
9090
endif()
9191

9292
if(LLVM_ENABLE_EXPENSIVE_CHECKS)

0 commit comments

Comments
 (0)