[libc++][hardening] Fix references to old names for hardening modes (#71743)

This should fix some builds broken by
https://github.com/llvm/llvm-project/pull/70575
This commit is contained in:
Konstantin Varlamov 2023-11-08 13:16:01 -10:00 committed by GitHub
parent 950f68991f
commit 4a9c71b8c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -81,7 +81,7 @@ if(APPLE)
set(LIBCXX_ABI_VERSION 2 CACHE STRING "")
set(LIBCXX_ENABLE_SHARED OFF CACHE BOOL "")
set(LIBCXX_ENABLE_STATIC_ABI_LIBRARY ON CACHE BOOL "")
set(LIBCXX_HARDENING_MODE "unchecked" CACHE STRING "")
set(LIBCXX_HARDENING_MODE "none" CACHE STRING "")
set(LIBCXX_USE_COMPILER_RT ON CACHE BOOL "")
set(RUNTIMES_CMAKE_ARGS "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13;-DCMAKE_OSX_ARCHITECTURES=arm64|x86_64" CACHE STRING "")
endif()

View File

@ -116,7 +116,7 @@ else()
set(LIBCXX_ABI_VERSION 2 CACHE STRING "")
set(LIBCXX_ENABLE_SHARED OFF CACHE BOOL "")
set(LIBCXX_ENABLE_STATIC_ABI_LIBRARY ON CACHE BOOL "")
set(LIBCXX_HARDENING_MODE "unchecked" CACHE STRING "")
set(LIBCXX_HARDENING_MODE "none" CACHE STRING "")
set(LIBCXX_USE_COMPILER_RT ON CACHE BOOL "")
set(LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi;libunwind" CACHE STRING "")
set(RUNTIMES_CMAKE_ARGS "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13;-DCMAKE_OSX_ARCHITECTURES=arm64|x86_64" CACHE STRING "")

View File

@ -111,12 +111,12 @@ if( LLVM_ENABLE_ASSERTIONS )
endif()
# Enable assertions in libstdc++.
add_compile_definitions(_GLIBCXX_ASSERTIONS)
# Cautiously enable the safe hardened mode in libc++.
# Cautiously enable the extensive hardening mode in libc++.
if((DEFINED LIBCXX_HARDENING_MODE) AND
(NOT LIBCXX_HARDENING_MODE STREQUAL "safe"))
message(WARNING "LLVM_ENABLE_ASSERTIONS implies LIBCXX_HARDENING_MODE \"safe\" but is overriden from command line with value \"${LIBCXX_HARDENING_MODE}\".")
(NOT LIBCXX_HARDENING_MODE STREQUAL "extensive"))
message(WARNING "LLVM_ENABLE_ASSERTIONS implies LIBCXX_HARDENING_MODE \"extensive\" but is overriden from command line with value \"${LIBCXX_HARDENING_MODE}\".")
else()
set(LIBCXX_HARDENING_MODE "safe")
set(LIBCXX_HARDENING_MODE "extensive")
endif()
endif()