1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

Don't search for third party libraries while using MSan

On the average user's system, those libraries will not be compiled with
MSan. Prior to this change, the LLVM test suite was full of false
positives from calls from third party libraries to MSan interceptors
like strlen.

We can remove this check if MSan ever grows a suppression mechanism
similar to TSan's.

llvm-svn: 253526
This commit is contained in:
Reid Kleckner 2015-11-19 00:05:21 +00:00
parent d3fd331575
commit 131251d95d

View File

@ -105,6 +105,12 @@ if( NOT PURE_WINDOWS )
endif() endif()
check_library_exists(dl dlopen "" HAVE_LIBDL) check_library_exists(dl dlopen "" HAVE_LIBDL)
check_library_exists(rt clock_gettime "" HAVE_LIBRT) check_library_exists(rt clock_gettime "" HAVE_LIBRT)
endif()
# Don't look for these libraries on Windows. Also don't look for them if we're
# using MSan, since uninstrmented third party code may call MSan interceptors
# like strlen, leading to false positives.
if( NOT PURE_WINDOWS AND NOT LLVM_USE_SANITIZER MATCHES "Memory.*")
if (LLVM_ENABLE_ZLIB) if (LLVM_ENABLE_ZLIB)
check_library_exists(z compress2 "" HAVE_LIBZ) check_library_exists(z compress2 "" HAVE_LIBZ)
else() else()