Skip to content

Commit

Permalink
[Driver][Fuchsia][NFC] Use GetLinkerPath to see if linker is lld
Browse files Browse the repository at this point in the history
Reviewed By: phosek

Differential Revision: https://reviews.llvm.org/D120074
  • Loading branch information
abrachet committed Feb 17, 2022
1 parent e0e1748 commit b9f4dff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions clang/lib/Driver/ToolChains/Fuchsia.cpp
Expand Up @@ -53,9 +53,9 @@ void fuchsia::Linker::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back("-z");
CmdArgs.push_back("now");

const char *Exec = Args.MakeArgString(ToolChain.GetLinkerPath());
if (llvm::sys::path::filename(Exec).equals_insensitive("ld.lld") ||
llvm::sys::path::stem(Exec).equals_insensitive("ld.lld")) {
bool IsLLD;
const char *Exec = Args.MakeArgString(ToolChain.GetLinkerPath(&IsLLD));
if (IsLLD) {
CmdArgs.push_back("-z");
CmdArgs.push_back("rodynamic");
CmdArgs.push_back("-z");
Expand Down

0 comments on commit b9f4dff

Please sign in to comment.