From 2ff63e30b68e761795348ce132e6ff37f1a62670 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Thu, 30 May 2013 18:01:30 +0000 Subject: Merging r182645: ------------------------------------------------------------------------ r182645 | eugenis | 2013-05-24 07:28:03 -0700 (Fri, 24 May 2013) | 6 lines Add -lrt to sanitizer link arguments. Sanitizer runtime intercepts functions from librt. Not doing this will fail if the librt dependency is not present at program startup (ex. comes from a dlopen()ed library). ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_33@182944 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Driver/Tools.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/Driver/Tools.cpp') diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 47d12e1e3b..aba1fe4d2d 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -1671,6 +1671,7 @@ static void addSanitizerRTLinkFlagsLinux( LibSanitizerArgs.begin(), LibSanitizerArgs.end()); CmdArgs.push_back("-lpthread"); + CmdArgs.push_back("-lrt"); CmdArgs.push_back("-ldl"); // If possible, use a dynamic symbols file to export the symbols from the -- cgit v1.2.3-70-g09d2