Skip to content
This repository was archived by the owner on May 21, 2019. It is now read-only.

Commit 8e31fff

Browse files
committed
Revert "[sanitizer] Support libc++abi in addition to libstdc++"
This reverts commit d1997bf. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309082 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent d1997bf commit 8e31fff

File tree

4 files changed

+3
-40
lines changed

4 files changed

+3
-40
lines changed

CMakeLists.txt

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -94,40 +94,6 @@ endif()
9494
option(SANITIZER_CAN_USE_CXXABI "Sanitizers can use cxxabi" ${use_cxxabi_default})
9595
pythonize_bool(SANITIZER_CAN_USE_CXXABI)
9696

97-
set(SANITIZER_CXX_ABI "default" CACHE STRING
98-
"Specify C++ ABI library to use.")
99-
set(CXXABIS none default libcxxabi libstdc++)
100-
set_property(CACHE SANITIZER_CXX_ABI PROPERTY STRINGS ;${CXXABIS})
101-
102-
if (SANITIZER_CXX_ABI STREQUAL "default")
103-
if (HAVE_LIBCXXABI AND COMPILER_RT_DEFAULT_TARGET_ONLY)
104-
set(SANITIZER_CXX_ABI_LIBNAME "libcxxabi")
105-
set(SANITIZER_CXX_ABI_INTREE 1)
106-
elseif (APPLE)
107-
set(SANITIZER_CXX_ABI_LIBNAME "libcxxabi")
108-
set(SANITIZER_CXX_ABI_SYSTEM 1)
109-
else()
110-
set(SANITIZER_CXX_ABI_LIBNAME "libstdc++")
111-
endif()
112-
elseif()
113-
set(SANITIZER_CXX_ABI_LIBNAME "${SANITIZER_CXX_ABI}")
114-
endif()
115-
116-
if (SANITIZER_CXX_ABI_LIBNAME STREQUAL "libcxxabi")
117-
if (SANITIZER_CXX_ABI_INTREE)
118-
if (TARGET unwind_shared OR HAVE_LIBUNWIND)
119-
list(APPEND SANITIZER_CXX_ABI_LIBRARY unwind_shared)
120-
endif()
121-
if (TARGET cxxabi_shared OR HAVE_LIBCXXABI)
122-
list(APPEND SANITIZER_CXX_ABI_LIBRARY cxxabi_shared)
123-
endif()
124-
else()
125-
list(APPEND SANITIZER_CXX_ABI_LIBRARY "c++abi")
126-
endif()
127-
elseif (SANITIZER_CXX_ABI_LIBNAME STREQUAL "libstdc++")
128-
append_list_if(COMPILER_RT_HAS_LIBSTDCXX stdc++ SANITIZER_CXX_ABI_LIBRARY)
129-
endif()
130-
13197
option(SANITIZER_USE_COMPILER_RT "Use compiler-rt builtins instead of libgcc" OFF)
13298

13399
#================================

lib/asan/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,9 @@ append_list_if(COMPILER_RT_HAS_LIBDL dl ASAN_DYNAMIC_LIBS)
7171
append_list_if(COMPILER_RT_HAS_LIBRT rt ASAN_DYNAMIC_LIBS)
7272
append_list_if(COMPILER_RT_HAS_LIBM m ASAN_DYNAMIC_LIBS)
7373
append_list_if(COMPILER_RT_HAS_LIBPTHREAD pthread ASAN_DYNAMIC_LIBS)
74+
append_list_if(COMPILER_RT_HAS_LIBSTDCXX stdc++ ASAN_DYNAMIC_LIBS)
7475
append_list_if(COMPILER_RT_HAS_LIBLOG log ASAN_DYNAMIC_LIBS)
7576

76-
list(APPEND ASAN_DYNAMIC_LIBS ${SANITIZER_CXX_ABI_LIBRARY})
77-
7877
# Compile ASan sources into an object library.
7978

8079
add_compiler_rt_object_libraries(RTAsan_dynamic

lib/tsan/dd/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ set(DD_LINKLIBS ${SANITIZER_COMMON_LINK_LIBS})
1515
append_list_if(COMPILER_RT_HAS_LIBDL dl DD_LINKLIBS)
1616
append_list_if(COMPILER_RT_HAS_LIBRT rt DD_LINKLIBS)
1717
append_list_if(COMPILER_RT_HAS_LIBPTHREAD pthread DD_LINKLIBS)
18-
19-
list(APPEND DD_LINKLIBS ${SANITIZER_CXX_ABI_LIBRARY})
18+
append_list_if(COMPILER_RT_HAS_LIBSTDCXX stdc++ DD_LINKLIBS)
2019

2120
add_custom_target(dd)
2221
# Deadlock detector is currently supported on 64-bit Linux only.

lib/ubsan/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ set(UBSAN_DYNAMIC_LIBS ${SANITIZER_COMMON_LINK_LIBS})
3939
append_list_if(COMPILER_RT_HAS_LIBDL dl UBSAN_DYNAMIC_LIBS)
4040
append_list_if(COMPILER_RT_HAS_LIBRT rt UBSAN_DYNAMIC_LIBS)
4141
append_list_if(COMPILER_RT_HAS_LIBPTHREAD pthread UBSAN_DYNAMIC_LIBS)
42-
43-
list(APPEND UBSAN_DYNAMIC_LIBS ${SANITIZER_CXX_ABI_LIBRARY})
42+
append_list_if(COMPILER_RT_HAS_LIBSTDCXX stdc++ UBSAN_DYNAMIC_LIBS)
4443

4544
add_compiler_rt_component(ubsan)
4645

0 commit comments

Comments
 (0)