[PATCH] D54741: [Driver] Link sanitizer runtime deps on Fuchsia when needed
Petr Hosek via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 19 23:54:38 PST 2018
phosek created this revision.
phosek added a reviewer: jakehehrlich.
Herald added a subscriber: cfe-commits.
Even though these deps weren't needed, this makes Fuchsia driver
better match other drivers, and it may be necessary when trying to
use different C libraries on Fuchsia.
Repository:
rC Clang
https://reviews.llvm.org/D54741
Files:
clang/lib/Driver/ToolChains/Fuchsia.cpp
Index: clang/lib/Driver/ToolChains/Fuchsia.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Fuchsia.cpp
+++ clang/lib/Driver/ToolChains/Fuchsia.cpp
@@ -109,8 +109,7 @@
D.getLTOMode() == LTOK_Thin);
}
- addSanitizerRuntimes(ToolChain, Args, CmdArgs);
-
+ bool NeedSanitizerDeps = addSanitizerRuntimes(ToolChain, Args, CmdArgs);
AddLinkerInputs(ToolChain, Inputs, Args, CmdArgs, JA);
ToolChain.addProfileRTLibs(Args, CmdArgs);
@@ -134,6 +133,9 @@
}
}
+ if (NeedSanitizerDeps)
+ linkSanitizerRuntimeDeps(ToolChain, CmdArgs);
+
AddRunTimeLibs(ToolChain, D, CmdArgs, Args);
if (Args.hasArg(options::OPT_pthread) ||
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54741.174728.patch
Type: text/x-patch
Size: 733 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181120/cc3b83c5/attachment-0001.bin>
More information about the cfe-commits
mailing list