From: Reid Kleckner Date: Thu, 19 Nov 2015 00:05:21 +0000 (+0000) Subject: Don't search for third party libraries while using MSan X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e96fd6deb052ad5c0c6a28d43bfd611bed7c2898;p=oota-llvm.git 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253526 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake index c9ad80e6122..c984a19e85f 100755 --- a/cmake/config-ix.cmake +++ b/cmake/config-ix.cmake @@ -105,6 +105,12 @@ if( NOT PURE_WINDOWS ) endif() check_library_exists(dl dlopen "" HAVE_LIBDL) 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) check_library_exists(z compress2 "" HAVE_LIBZ) else()