[PATCH] D29159: [clang] Add linker flag when including "asan_dynamic_runtime_thunk".
Marcos Pividori via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 28 22:14:31 PST 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL293420: [windows] [asan] Add linker flag when including "asan_dynamic_runtime_thunk". (authored by mpividori).
Changed prior to commit:
https://reviews.llvm.org/D29159?vs=85964&id=86196#toc
Repository:
rL LLVM
https://reviews.llvm.org/D29159
Files:
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/test/Driver/cl-link.c
Index: cfe/trunk/test/Driver/cl-link.c
===================================================================
--- cfe/trunk/test/Driver/cl-link.c
+++ cfe/trunk/test/Driver/cl-link.c
@@ -22,8 +22,9 @@
// ASAN-MD: "-debug"
// ASAN-MD: "-incremental:no"
// ASAN-MD: "{{.*}}clang_rt.asan_dynamic-i386.lib"
-// ASAN-MD: "{{.*}}clang_rt.asan_dynamic_runtime_thunk-i386.lib"
+// ASAN-MD: "{{[^"]*}}clang_rt.asan_dynamic_runtime_thunk-i386.lib"
// ASAN-MD: "-include:___asan_seh_interceptor"
+// ASAN-MD: "-wholearchive:{{.*}}clang_rt.asan_dynamic_runtime_thunk-i386.lib"
// ASAN-MD: "{{.*}}cl-link{{.*}}.obj"
// RUN: %clang_cl /LD -### /Tc%s 2>&1 | FileCheck --check-prefix=DLL %s
Index: cfe/trunk/lib/Driver/Tools.cpp
===================================================================
--- cfe/trunk/lib/Driver/Tools.cpp
+++ cfe/trunk/lib/Driver/Tools.cpp
@@ -10990,6 +10990,10 @@
TC.getArch() == llvm::Triple::x86
? "-include:___asan_seh_interceptor"
: "-include:__asan_seh_interceptor"));
+ // Make sure the linker consider all object files from the dynamic runtime
+ // thunk.
+ CmdArgs.push_back(Args.MakeArgString(std::string("-wholearchive:") +
+ TC.getCompilerRT(Args, "asan_dynamic_runtime_thunk")));
} else if (DLL) {
CmdArgs.push_back(TC.getCompilerRTArgString(Args, "asan_dll_thunk"));
} else {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29159.86196.patch
Type: text/x-patch
Size: 1387 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170129/e223dd9f/attachment.bin>
More information about the llvm-commits
mailing list