]> granicus.if.org Git - clang/commitdiff
[CMake] Use libc++ and compiler-rt for sanitizers
authorPetr Hosek <phosek@chromium.org>
Sun, 15 Jul 2018 03:11:43 +0000 (03:11 +0000)
committerPetr Hosek <phosek@chromium.org>
Sun, 15 Jul 2018 03:11:43 +0000 (03:11 +0000)
When building runtimes for Linux as part of Fuchsia toolchain, use
libc++ and compiler-rt for sanitizers.

Differential Revision: https://reviews.llvm.org/D49331

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@337117 91177308-0d34-0410-b5e6-96231b3b80d8

cmake/caches/Fuchsia-stage2.cmake

index ae8658debd33f60c71818fa813d1e9b7fe016d5f..7264f90d4e5968c578c8973b4c9a5a322e37b296 100644 (file)
@@ -57,6 +57,9 @@ elseif(UNIX)
       set(RUNTIMES_${target}-linux-gnu_LIBCXX_USE_COMPILER_RT ON CACHE BOOL "")
       set(RUNTIMES_${target}-linux-gnu_LIBCXX_ENABLE_SHARED OFF CACHE BOOL "")
       set(RUNTIMES_${target}-linux-gnu_LIBCXX_ENABLE_STATIC_ABI_LIBRARY ON CACHE BOOL "")
+      set(RUNTIMES_${target}-linux-gnu_SANITIZER_CXX_ABI "libc++" CACHE STRING "")
+      set(RUNTIMES_${target}-linux-gnu_SANITIZER_CXX_ABI_INTREE ON CACHE BOOL "")
+      set(RUNTIMES_${target}-linux-gnu_COMPILER_RT_USE_BUILTINS_LIBRARY ON CACHE BOOL "")
     endif()
   endforeach()
 endif()
@@ -100,7 +103,6 @@ if(FUCHSIA_SDK)
     set(RUNTIMES_${target}-fuchsia_LIBCXXABI_USE_COMPILER_RT ON CACHE BOOL "")
     set(RUNTIMES_${target}-fuchsia_LIBCXXABI_USE_LLVM_UNWINDER ON CACHE BOOL "")
     set(RUNTIMES_${target}-fuchsia_LIBCXX_USE_COMPILER_RT ON CACHE BOOL "")
-    set(RUNTIMES_${target}-fuchsia_SANITIZER_USE_COMPILER_RT ON CACHE BOOL "")
   endforeach()
 
   set(LLVM_RUNTIME_SANITIZERS "Address" CACHE STRING "")