[llvm-branch-commits] [llvm] 14dbd4b - [CMake] Use `LLVM_ENABLE_ASSERTIONS` to enable the hardened mode in libc++.
Tobias Hieta via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Jul 28 00:11:47 PDT 2023
Author: Konstantin Varlamov
Date: 2023-07-28T09:08:27+02:00
New Revision: 14dbd4bfc1f374d73ecee43ff078982edc90eb08
URL: https://github.com/llvm/llvm-project/commit/14dbd4bfc1f374d73ecee43ff078982edc90eb08
DIFF: https://github.com/llvm/llvm-project/commit/14dbd4bfc1f374d73ecee43ff078982edc90eb08.diff
LOG: [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 194e2ba1250c97926ed83b1ade1fbcbb49112a05)
Added:
Modified:
llvm/cmake/modules/HandleLLVMOptions.cmake
Removed:
################################################################################
diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake
index 19d6c58d991b7c..76723be696e51c 100644
--- a/llvm/cmake/modules/HandleLLVMOptions.cmake
+++ b/llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -85,8 +85,8 @@ if( LLVM_ENABLE_ASSERTIONS )
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)
More information about the llvm-branch-commits
mailing list