Fix building Asan and common sanitizers tests on FreeBSD 9.2
llvm-svn: 207408
This commit is contained in:
parent
fb68e640d2
commit
f9eba2f51d
|
@ -50,6 +50,11 @@ set(ASAN_UNITTEST_INSTRUMENTED_CFLAGS
|
|||
|
||||
# Unit tests require libstdc++.
|
||||
set(ASAN_UNITTEST_COMMON_LINKFLAGS -lstdc++)
|
||||
# x86_64 FreeBSD 9.2 additionally requires libc++ to build the tests.
|
||||
if(CMAKE_SYSTEM MATCHES "FreeBSD-9.2-RELEASE")
|
||||
list(APPEND ASAN_UNITTEST_COMMON_LINKFLAGS "-lc++")
|
||||
endif()
|
||||
|
||||
# Unit tests on Mac depend on Foundation.
|
||||
if(APPLE)
|
||||
list(APPEND ASAN_UNITTEST_COMMON_LINKFLAGS -framework Foundation)
|
||||
|
|
|
@ -45,6 +45,10 @@ set(SANITIZER_TEST_LINK_FLAGS_COMMON
|
|||
-lstdc++)
|
||||
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.
|
||||
if(CMAKE_SYSTEM MATCHES "FreeBSD-9.2-RELEASE")
|
||||
list(APPEND SANITIZER_TEST_LINK_FLAGS_COMMON "-lc++")
|
||||
endif()
|
||||
|
||||
include_directories(..)
|
||||
include_directories(../..)
|
||||
|
|
Loading…
Reference in New Issue