Skip to content

Commit

Permalink
[libc++][hardening] Fix references to old names for hardening modes (#…
Browse files Browse the repository at this point in the history
…71743)

This should fix some builds broken by
#70575
  • Loading branch information
var-const committed Nov 8, 2023
1 parent 950f689 commit 4a9c71b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion clang/cmake/caches/Fuchsia-stage2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion clang/cmake/caches/Fuchsia.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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 "")
Expand Down
8 changes: 4 additions & 4 deletions llvm/cmake/modules/HandleLLVMOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 4a9c71b

Please sign in to comment.