From 131251d95de67c8da0ff8db392898303982aeba2 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Thu, 19 Nov 2015 00:05:21 +0000 Subject: [PATCH] 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 --- cmake/config-ix.cmake | 6 ++++++ 1 file changed, 6 insertions(+) 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()