[clang] c6a198c - [CMake][Fuchsia] Use unchecked hardening mode for libc++

Petr Hosek via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 6 14:37:56 PST 2023


Author: Petr Hosek
Date: 2023-11-06T22:37:49Z
New Revision: c6a198c72ab0bae4bc8c322ce84feb691c190e5d

URL: https://github.com/llvm/llvm-project/commit/c6a198c72ab0bae4bc8c322ce84feb691c190e5d
DIFF: https://github.com/llvm/llvm-project/commit/c6a198c72ab0bae4bc8c322ce84feb691c190e5d.diff

LOG: [CMake][Fuchsia] Use unchecked hardening mode for libc++

We set LLVM_ENABLE_ASSERTIONS in some builds which is now translated
to LIBCXX_HARDENING_MODE=safe, but our codebase is not yet clean and
we're getting assertion failures.

Added: 
    

Modified: 
    clang/cmake/caches/Fuchsia-stage2.cmake
    clang/cmake/caches/Fuchsia.cmake

Removed: 
    


################################################################################
diff  --git a/clang/cmake/caches/Fuchsia-stage2.cmake b/clang/cmake/caches/Fuchsia-stage2.cmake
index 13bb5ad3546e98f..a4d2926559eee7f 100644
--- a/clang/cmake/caches/Fuchsia-stage2.cmake
+++ b/clang/cmake/caches/Fuchsia-stage2.cmake
@@ -81,6 +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_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()

diff  --git a/clang/cmake/caches/Fuchsia.cmake b/clang/cmake/caches/Fuchsia.cmake
index 0230bb056a4f0a1..4c9cd12101d478a 100644
--- a/clang/cmake/caches/Fuchsia.cmake
+++ b/clang/cmake/caches/Fuchsia.cmake
@@ -116,6 +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_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 "")


        


More information about the cfe-commits mailing list