diff options
| author | Jonas Hahnfeld <hahnjo@hahnjo.de> | 2019-02-15 14:30:18 +0000 |
|---|---|---|
| committer | Jonas Hahnfeld <hahnjo@hahnjo.de> | 2019-02-15 14:30:18 +0000 |
| commit | 3cc63cfaa7772cd994ee7e8e811e0380f39259c9 (patch) | |
| tree | 8236ada641a040c1fd18a1eb7fb22508ed20eae2 /compiler-rt/lib/fuzzer | |
| parent | f7e84a2ccc4b8324785c094691e3611a854f74b9 (diff) | |
| download | bcm5719-llvm-3cc63cfaa7772cd994ee7e8e811e0380f39259c9.tar.gz bcm5719-llvm-3cc63cfaa7772cd994ee7e8e811e0380f39259c9.zip | |
[compiler-rt] Cleanup usage of C++ ABI library
Add missed value "libcxxabi" and introduce SANITIZER_TEST_CXX for linking
unit tests. This needs to be a full C++ library and cannot be libcxxabi.
Differential Revision: https://reviews.llvm.org/D58012
llvm-svn: 354132
Diffstat (limited to 'compiler-rt/lib/fuzzer')
| -rw-r--r-- | compiler-rt/lib/fuzzer/tests/CMakeLists.txt | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler-rt/lib/fuzzer/tests/CMakeLists.txt b/compiler-rt/lib/fuzzer/tests/CMakeLists.txt index 485153be730..052c0f17b95 100644 --- a/compiler-rt/lib/fuzzer/tests/CMakeLists.txt +++ b/compiler-rt/lib/fuzzer/tests/CMakeLists.txt @@ -17,10 +17,11 @@ set_target_properties(FuzzerUnitTests PROPERTIES FOLDER "Compiler-RT Tests") set(LIBFUZZER_UNITTEST_LINK_FLAGS ${COMPILER_RT_UNITTEST_LINK_FLAGS}) list(APPEND LIBFUZZER_UNITTEST_LINK_FLAGS --driver-mode=g++) -if(APPLE OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") - list(APPEND LIBFUZZER_UNITTEST_LINK_FLAGS -lc++ -lpthread) -elseif(NOT WIN32) - list(APPEND LIBFUZZER_UNITTEST_LINK_FLAGS -lstdc++ -lpthread) +foreach(lib ${SANITIZER_TEST_CXX_LIBRARIES}) + list(APPEND LIBFUZZER_UNITTEST_LINK_FLAGS -l${lib}) +endforeach() +if(NOT WIN32) + list(APPEND LIBFUZZER_UNITTEST_LINK_FLAGS ${CMAKE_THREAD_LIBS_INIT}) endif() if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" AND COMPILER_RT_LIBCXX_PATH) |

