Skip to content
Open
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -949,8 +949,16 @@ void tools::addOpenMPRuntimeSpecificRPath(const ToolChain &TC,
SmallString<256> DefaultLibPath =
llvm::sys::path::parent_path(TC.getDriver().Dir);
llvm::sys::path::append(DefaultLibPath, CLANG_INSTALL_LIBDIR_BASENAME);
if (TC.getSanitizerArgs(Args).needsAsanRt()) {
CmdArgs.push_back("-rpath");
CmdArgs.push_back(Args.MakeArgString(TC.getCompilerRTPath()));
}
CmdArgs.push_back("-rpath");
CmdArgs.push_back(Args.MakeArgString(CandidateRPath.c_str()));
if (llvm::find_if(CmdArgs, [](StringRef str) {
return !str.compare("--enable-new-dtags");
}) == CmdArgs.end())
CmdArgs.push_back("--disable-new-dtags");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -568,8 +568,6 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
// Add Fortran runtime libraries
if (needFortranLibs(D, Args)) {
ToolChain.AddFortranStdlibLibArgs(Args, CmdArgs);
CmdArgs.push_back("-rpath");
Copy link
Contributor

@estewart08 estewart08 Apr 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need guarded with ! needsAsanRt?

CmdArgs.push_back(Args.MakeArgString(D.Dir + "/../lib"));
} else {
// Claim "no Flang libraries" arguments if any
for (auto Arg : Args.filtered(options::OPT_noFlangLibs)) {
Expand Down