[PATCH] D156377: [CMake] Use `LLVM_ENABLE_ASSERTIONS` to enable the hardened mode in libc++.
Konstantin Varlamov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 26 14:54:09 PDT 2023
var-const created this revision.
Herald added a subscriber: ekilmer.
Herald added a project: All.
var-const requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Use the new libc++ hardened mode instead of the deprecated safe mode.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D156377
Files:
llvm/cmake/modules/HandleLLVMOptions.cmake
Index: llvm/cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- llvm/cmake/modules/HandleLLVMOptions.cmake
+++ llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -85,8 +85,8 @@
endif()
# Enable assertions in libstdc++.
add_compile_definitions(_GLIBCXX_ASSERTIONS)
- # Enable assertions in libc++.
- add_compile_definitions(_LIBCPP_ENABLE_ASSERTIONS)
+ # Enable the hardened mode in libc++.
+ add_compile_definitions(_LIBCPP_ENABLE_HARDENED_MODE)
endif()
if(LLVM_ENABLE_EXPENSIVE_CHECKS)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156377.544531.patch
Type: text/x-patch
Size: 557 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230726/824a1482/attachment.bin>
More information about the llvm-commits
mailing list