[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:25:04 PDT 2018
pelikan created this revision.
pelikan added a reviewer: dberris.
Depends on https://reviews.llvm.org/D38993.
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,7 +706,8 @@
return !StaticRuntimes.empty() || !NonWholeStaticRuntimes.empty();
}
-bool tools::addXRayRuntime(const ToolChain&TC, const ArgList &Args, ArgStringList &CmdArgs) {
+bool tools::addXRayRuntime(const ToolChain&TC, const ArgList &Args,
+ ArgStringList &CmdArgs) {
if (Args.hasArg(options::OPT_shared))
return false;
@@ -716,6 +717,10 @@
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.142173.patch
Type: text/x-patch
Size: 1014 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180412/34f1e8e5/attachment.bin>
More information about the cfe-commits
mailing list