[llvm-branch-commits] [cfe-branch] r182944 - Merging r182645:
Bill Wendling
isanbard at gmail.com
Thu May 30 11:01:30 PDT 2013
Author: void
Date: Thu May 30 13:01:30 2013
New Revision: 182944
URL: http://llvm.org/viewvc/llvm-project?rev=182944&view=rev
Log:
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).
------------------------------------------------------------------------
Modified:
cfe/branches/release_33/ (props changed)
cfe/branches/release_33/lib/Driver/Tools.cpp
cfe/branches/release_33/test/Driver/sanitizer-ld.c
Propchange: cfe/branches/release_33/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 30 13:01:30 2013
@@ -1,4 +1,4 @@
/cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:181283,181286,181299,181342,181368,181465,181487,181728,181750,181909,182072
+/cfe/trunk:181283,181286,181299,181342,181368,181465,181487,181728,181750,181909,182072,182645
/cfe/trunk/test:170344
/cfe/trunk/test/SemaTemplate:126920
Modified: cfe/branches/release_33/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_33/lib/Driver/Tools.cpp?rev=182944&r1=182943&r2=182944&view=diff
==============================================================================
--- cfe/branches/release_33/lib/Driver/Tools.cpp (original)
+++ cfe/branches/release_33/lib/Driver/Tools.cpp Thu May 30 13:01:30 2013
@@ -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
Modified: cfe/branches/release_33/test/Driver/sanitizer-ld.c
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_33/test/Driver/sanitizer-ld.c?rev=182944&r1=182943&r2=182944&view=diff
==============================================================================
--- cfe/branches/release_33/test/Driver/sanitizer-ld.c (original)
+++ cfe/branches/release_33/test/Driver/sanitizer-ld.c Thu May 30 13:01:30 2013
@@ -10,6 +10,7 @@
// CHECK-ASAN-LINUX-NOT: "-lc"
// CHECK-ASAN-LINUX: libclang_rt.asan-i386.a"
// CHECK-ASAN-LINUX: "-lpthread"
+// CHECK-ASAN-LINUX: "-lrt"
// CHECK-ASAN-LINUX: "-ldl"
// CHECK-ASAN-LINUX-NOT: "-export-dynamic"
// CHECK-ASAN-LINUX: "--dynamic-list={{.*}}libclang_rt.asan-i386.a.syms"
@@ -24,6 +25,7 @@
// CHECK-ASAN-LINUX-CXX-NOT: "-lc"
// CHECK-ASAN-LINUX-CXX: "-whole-archive" "{{.*}}libclang_rt.asan-i386.a" "-no-whole-archive"
// CHECK-ASAN-LINUX-CXX: "-lpthread"
+// CHECK-ASAN-LINUX-CXX: "-lrt"
// CHECK-ASAN-LINUX-CXX: "-ldl"
// CHECK-ASAN-LINUX-CXX: "-export-dynamic"
// CHECK-ASAN-LINUX-CXX-NOT: "--dynamic-list"
@@ -70,6 +72,7 @@
// CHECK-TSAN-LINUX-CXX-NOT: stdc++
// CHECK-TSAN-LINUX-CXX: "-whole-archive" "{{.*}}libclang_rt.tsan-x86_64.a" "-no-whole-archive"
// CHECK-TSAN-LINUX-CXX: "-lpthread"
+// CHECK-TSAN-LINUX-CXX: "-lrt"
// CHECK-TSAN-LINUX-CXX: "-ldl"
// CHECK-TSAN-LINUX-CXX-NOT: "-export-dynamic"
// CHECK-TSAN-LINUX-CXX: "--dynamic-list={{.*}}libclang_rt.tsan-x86_64.a.syms"
@@ -85,6 +88,7 @@
// CHECK-MSAN-LINUX-CXX-NOT: stdc++
// CHECK-MSAN-LINUX-CXX: "-whole-archive" "{{.*}}libclang_rt.msan-x86_64.a" "-no-whole-archive"
// CHECK-MSAN-LINUX-CXX: "-lpthread"
+// CHECK-MSAN-LINUX-CXX: "-lrt"
// CHECK-MSAN-LINUX-CXX: "-ldl"
// CHECK-MSAN-LINUX-CXX-NOT: "-export-dynamic"
// CHECK-MSAN-LINUX-CXX: "--dynamic-list={{.*}}libclang_rt.msan-x86_64.a.syms"
More information about the llvm-branch-commits
mailing list