Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions clang/lib/Driver/ToolChain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,8 @@ llvm::opt::DerivedArgList *ToolChain::TranslateOpenMPTargetArgs(
}

static void addRuntimeRunPath(const ToolChain &TC, const ArgList &Args,
ArgStringList &CmdArgs) {
ArgStringList &CmdArgs,
const llvm::Triple &Triple) {
// Allow the -fno-rtlib-add-rpath flag to prevent adding this default
// directory to the runpath.
if (!Args.hasFlag(options::OPT_frtlib_add_rpath,
Expand All @@ -1059,7 +1060,8 @@ static void addRuntimeRunPath(const ToolChain &TC, const ArgList &Args,
CmdArgs.push_back("-rpath");
CmdArgs.push_back(Args.MakeArgString(CandidateRPath->c_str()));
// TODO: Check the portability of the --enable-new-dtags flag.
CmdArgs.push_back("--enable-new-dtags");
if (Triple.isOSBinFormatELF())
CmdArgs.push_back("--enable-new-dtags");
}
}
}
Expand Down Expand Up @@ -1096,7 +1098,7 @@ void ToolChain::AddTapirRuntimeLibArgs(const ArgList &Args,

// Add to the executable's runpath the default directory containing OpenCilk
// runtime, when the runtime is compiled as an integrated component.
addRuntimeRunPath(*this, Args, CmdArgs);
addRuntimeRunPath(*this, Args, CmdArgs, Triple);
if (OnlyStaticOpenCilk)
CmdArgs.push_back("-Bdynamic");
CmdArgs.push_back("-lpthread");
Expand Down