[PATCH] D46452: [sanitizer] Don't add --export-dynamic for Myriad
Walter Lee via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 16 21:01:36 PDT 2018
waltl updated this revision to Diff 147233.
waltl added a comment.
Address CR comments
Repository:
rL LLVM
https://reviews.llvm.org/D46452
Files:
clang/lib/Driver/ToolChains/CommonArgs.cpp
Index: clang/lib/Driver/ToolChains/CommonArgs.cpp
===================================================================
--- clang/lib/Driver/ToolChains/CommonArgs.cpp
+++ clang/lib/Driver/ToolChains/CommonArgs.cpp
@@ -538,6 +538,11 @@
// the option, so don't try to pass it.
if (TC.getTriple().getOS() == llvm::Triple::Solaris)
return true;
+ // Myriad is static linking only. Furthermore, some versions of its
+ // linker have the bug where --export-dynamic overrides -static, so
+ // don't use --export-dynamic on that platform.
+ if (TC.getTriple().getVendor() == llvm::Triple::Myriad)
+ return true;
SmallString<128> SanRT(TC.getCompilerRT(Args, Sanitizer));
if (llvm::sys::fs::exists(SanRT + ".syms")) {
CmdArgs.push_back(Args.MakeArgString("--dynamic-list=" + SanRT + ".syms"));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46452.147233.patch
Type: text/x-patch
Size: 813 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180517/a8b217f6/attachment.bin>
More information about the cfe-commits
mailing list