summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimur Iskhodzhanov <timurrrr@google.com>2014-05-19 08:19:38 +0000
committerTimur Iskhodzhanov <timurrrr@google.com>2014-05-19 08:19:38 +0000
commit930ffe94aa93e84858f5b80df95711af5a662b09 (patch)
treeb83e2b586f5b540f471be20df726566678f61885
parent7f0c517168be0873856c54c0443da5341046e03e (diff)
downloadbcm5719-llvm-930ffe94aa93e84858f5b80df95711af5a662b09.tar.gz
bcm5719-llvm-930ffe94aa93e84858f5b80df95711af5a662b09.zip
[Sanitizer tests] Don't need to use -lstdc++ thanks to --driver-mode=g++
Reviewed at http://reviews.llvm.org/D3796 llvm-svn: 209115
-rw-r--r--compiler-rt/cmake/config-ix.cmake1
-rw-r--r--compiler-rt/lib/asan/tests/CMakeLists.txt3
-rw-r--r--compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt5
3 files changed, 4 insertions, 5 deletions
diff --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake
index ea89a997ca2..9902b44f1e3 100644
--- a/compiler-rt/cmake/config-ix.cmake
+++ b/compiler-rt/cmake/config-ix.cmake
@@ -45,7 +45,6 @@ check_cxx_compiler_flag(/wd4722 COMPILER_RT_HAS_WD4722_FLAG)
check_symbol_exists(__func__ "" COMPILER_RT_HAS_FUNC_SYMBOL)
# Libraries.
-check_library_exists(stdc++ __cxa_pure_virtual "" COMPILER_RT_HAS_LIBSTDCXX)
check_library_exists(m pow "" COMPILER_RT_HAS_LIBM)
check_library_exists(dl dlopen "" COMPILER_RT_HAS_LIBDL)
check_library_exists(pthread pthread_create "" COMPILER_RT_HAS_LIBPTHREAD)
diff --git a/compiler-rt/lib/asan/tests/CMakeLists.txt b/compiler-rt/lib/asan/tests/CMakeLists.txt
index 2e4caa4b8e8..331f38fed35 100644
--- a/compiler-rt/lib/asan/tests/CMakeLists.txt
+++ b/compiler-rt/lib/asan/tests/CMakeLists.txt
@@ -62,9 +62,6 @@ set(ASAN_UNITTEST_INSTRUMENTED_CFLAGS
"-fsanitize-blacklist=${ASAN_BLACKLIST_FILE}"
)
-# Unit tests require libstdc++ on POSIX.
-append_if(COMPILER_RT_HAS_LIBSTDCXX -lstdc++ ASAN_UNITTEST_COMMON_LINKFLAGS)
-
if(NOT MSVC)
list(APPEND ASAN_UNITTEST_COMMON_LINKFLAGS --driver-mode=g++)
endif()
diff --git a/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt b/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt
index 0293197898e..331117b248c 100644
--- a/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt
+++ b/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt
@@ -65,7 +65,10 @@ if(MSVC)
-Wno-undefined-inline)
endif()
-append_if(COMPILER_RT_HAS_LIBSTDCXX -lstdc++ SANITIZER_TEST_LINK_FLAGS_COMMON)
+if(NOT MSVC)
+ list(APPEND SANITIZER_TEST_LINK_FLAGS_COMMON --driver-mode=g++)
+endif()
+
append_if(COMPILER_RT_HAS_LIBDL -ldl SANITIZER_TEST_LINK_FLAGS_COMMON)
append_if(COMPILER_RT_HAS_LIBPTHREAD -lpthread SANITIZER_TEST_LINK_FLAGS_COMMON)
# x86_64 FreeBSD 9.2 additionally requires libc++ to build the tests.
OpenPOWER on IntegriCloud