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; }