forked from OSchip/llvm-project
[asan] Stop appending -lm, -pthread and other linker options on Darwin for ASan unit tests
On Darwin, -lm, -pthread and others are implied. -pthread currently produces a warning (compiler option unused). Differential Revision: https://reviews.llvm.org/D24698 llvm-svn: 282260
This commit is contained in:
parent
6919ae5abc
commit
7bc254f89c
|
@ -106,12 +106,13 @@ set(ASAN_UNITTEST_INSTRUMENTED_LIBS)
|
|||
append_list_if(ANDROID atomic ASAN_UNITTEST_INSTRUMENTED_LIBS)
|
||||
|
||||
set(ASAN_UNITTEST_NOINST_LINKFLAGS ${ASAN_UNITTEST_COMMON_LINKFLAGS})
|
||||
append_list_if(COMPILER_RT_HAS_LIBM -lm ASAN_UNITTEST_NOINST_LINKFLAGS)
|
||||
append_list_if(COMPILER_RT_HAS_LIBDL -ldl ASAN_UNITTEST_NOINST_LINKFLAGS)
|
||||
append_list_if(COMPILER_RT_HAS_LIBRT -lrt ASAN_UNITTEST_NOINST_LINKFLAGS)
|
||||
append_list_if(COMPILER_RT_HAS_LIBPTHREAD -pthread ASAN_UNITTEST_NOINST_LINKFLAGS)
|
||||
append_list_if(COMPILER_RT_HAS_LIBPTHREAD -pthread
|
||||
ASAN_DYNAMIC_UNITTEST_INSTRUMENTED_LINKFLAGS)
|
||||
if(NOT APPLE)
|
||||
append_list_if(COMPILER_RT_HAS_LIBM -lm ASAN_UNITTEST_NOINST_LINKFLAGS)
|
||||
append_list_if(COMPILER_RT_HAS_LIBDL -ldl ASAN_UNITTEST_NOINST_LINKFLAGS)
|
||||
append_list_if(COMPILER_RT_HAS_LIBRT -lrt ASAN_UNITTEST_NOINST_LINKFLAGS)
|
||||
append_list_if(COMPILER_RT_HAS_LIBPTHREAD -pthread ASAN_UNITTEST_NOINST_LINKFLAGS)
|
||||
append_list_if(COMPILER_RT_HAS_LIBPTHREAD -pthread ASAN_DYNAMIC_UNITTEST_INSTRUMENTED_LINKFLAGS)
|
||||
endif()
|
||||
|
||||
# TODO(eugenis): move all -l flags above to _LIBS?
|
||||
set(ASAN_UNITTEST_NOINST_LIBS)
|
||||
|
|
Loading…
Reference in New Issue