[PATCH] D45570: [XRay] [clang] use compiler-rt's symbol visibility rules
Martin Pelikán via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 12 07:27:47 PDT 2018
pelikan updated this revision to Diff 142174.
pelikan added a comment.
while there, clang-format the code I touched
Repository:
rC Clang
https://reviews.llvm.org/D45570
Files:
lib/Driver/ToolChains/CommonArgs.cpp
Index: lib/Driver/ToolChains/CommonArgs.cpp
===================================================================
--- lib/Driver/ToolChains/CommonArgs.cpp
+++ lib/Driver/ToolChains/CommonArgs.cpp
@@ -706,16 +706,20 @@
return !StaticRuntimes.empty() || !NonWholeStaticRuntimes.empty();
}
-bool tools::addXRayRuntime(const ToolChain&TC, const ArgList &Args, ArgStringList &CmdArgs) {
- if (Args.hasArg(options::OPT_shared))
- return false;
+bool tools::addXRayRuntime(const ToolChain &TC, const ArgList &Args,
+ ArgStringList &CmdArgs) {
+ if (Args.hasArg(options::OPT_shared)) return false;
if (TC.getXRayArgs().needsXRayRt()) {
CmdArgs.push_back("-whole-archive");
CmdArgs.push_back(TC.getCompilerRTArgString(Args, "xray", false));
for (const auto &Mode : TC.getXRayArgs().modeList())
CmdArgs.push_back(TC.getCompilerRTArgString(Args, Mode, false));
CmdArgs.push_back("-no-whole-archive");
+
+ SmallString<128> XRay(TC.getCompilerRT(Args, "xray"));
+ CmdArgs.push_back(Args.MakeArgString("--dynamic-list=" + XRay + ".syms"));
+ CmdArgs.push_back(Args.MakeArgString("--version-script=" + XRay + ".vers"));
return true;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45570.142174.patch
Type: text/x-patch
Size: 1206 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180412/abb54df4/attachment.bin>
More information about the cfe-commits
mailing list