[lsan] Report the missing linker only when the linker is actually missing.
authorAlex Shlyapnikov <alekseys@google.com>
Mon, 15 May 2017 23:11:01 +0000 (23:11 +0000)
committerAlex Shlyapnikov <alekseys@google.com>
Mon, 15 May 2017 23:11:01 +0000 (23:11 +0000)
Reviewers: eugenis

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D33218

llvm-svn: 303129

compiler-rt/lib/lsan/lsan_common_linux.cc

index fadd026..c903be4 100644 (file)
@@ -62,8 +62,10 @@ void InitializePlatformSpecificModules() {
       return;
     }
   }
-  VReport(1, "LeakSanitizer: Dynamic linker not found. "
-             "TLS will not be handled correctly.\n");
+  if (linker == nullptr) {
+    VReport(1, "LeakSanitizer: Dynamic linker not found. "
+               "TLS will not be handled correctly.\n");
+  }
 }
 
 static int ProcessGlobalRegionsCallback(struct dl_phdr_info *info, size_t size,