Add libcxxabi option back for sanitizer use.
authorStephen Hines <srhines@google.com>
Wed, 11 Jul 2018 00:50:03 +0000 (00:50 +0000)
committerStephen Hines <srhines@google.com>
Wed, 11 Jul 2018 00:50:03 +0000 (00:50 +0000)
Summary:
A prior refactoring accidentally dropped the case for using libc++abi as
the out-of-tree C++ runtime library for sanitizers. This patch restores
that functionality, which is used by Android, which can't depend on the
full libc++ for these libraries.

Reviewers: phosek, EricWF

Reviewed By: phosek

Subscribers: meikeb, kongyi, chh, mgorny, delcypher, llvm-commits, #sanitizers, pirama

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

llvm-svn: 336749

compiler-rt/CMakeLists.txt

index 6ece416..be4066f 100644 (file)
@@ -353,6 +353,8 @@ if (SANITIZER_CXX_ABI_LIBNAME STREQUAL "libc++")
   else()
     append_list_if(COMPILER_RT_HAS_LIBCXX c++ SANITIZER_CXX_ABI_LIBRARY)
   endif()
+elseif (SANITIZER_CXX_ABI_LIBNAME STREQUAL "libcxxabi")
+  list(APPEND SANITIZER_CXX_ABI_LIBRARY "c++abi")
 elseif (SANITIZER_CXX_ABI_LIBNAME STREQUAL "libstdc++")
   append_list_if(COMPILER_RT_HAS_LIBSTDCXX stdc++ SANITIZER_CXX_ABI_LIBRARY)
 endif()