[PATCH] D29754: [clang] Add linker flag "wholearchive" for asan_cxx.
Marcos Pividori via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 9 10:34:13 PST 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL294604: [windows] [asan] Add wholearchive flag when including asan_cxx lib. (authored by mpividori).
Changed prior to commit:
https://reviews.llvm.org/D29754?vs=87773&id=87835#toc
Repository:
rL LLVM
https://reviews.llvm.org/D29754
Files:
cfe/trunk/lib/Driver/Tools.cpp
Index: cfe/trunk/lib/Driver/Tools.cpp
===================================================================
--- cfe/trunk/lib/Driver/Tools.cpp
+++ cfe/trunk/lib/Driver/Tools.cpp
@@ -11006,13 +11006,14 @@
} else if (DLL) {
CmdArgs.push_back(TC.getCompilerRTArgString(Args, "asan_dll_thunk"));
} else {
- for (const auto &Lib : {"asan", "asan_cxx"})
+ for (const auto &Lib : {"asan", "asan_cxx"}) {
CmdArgs.push_back(TC.getCompilerRTArgString(Args, Lib));
- // Make sure the linker consider all object files from the static library.
- // This is necessary because instrumented dlls need access to all the
- // interface exported by the static lib in the main executable.
- CmdArgs.push_back(Args.MakeArgString(std::string("-wholearchive:") +
- TC.getCompilerRT(Args, "asan")));
+ // Make sure the linker consider all object files from the static lib.
+ // This is necessary because instrumented dlls need access to all the
+ // interface exported by the static lib in the main executable.
+ CmdArgs.push_back(Args.MakeArgString(std::string("-wholearchive:") +
+ TC.getCompilerRT(Args, Lib)));
+ }
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29754.87835.patch
Type: text/x-patch
Size: 1216 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170209/462b57f1/attachment.bin>
More information about the llvm-commits
mailing list