[clang] 5364b36 - Revert "[Driver][Fuchsia][NFC] Use GetLinkerPath to see if linker is lld"
Alex Brachet via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 17 10:42:32 PST 2022
Author: Alex Brachet
Date: 2022-02-17T18:41:49Z
New Revision: 5364b36868210364b2ccf8e9f9169ed1fd545ae0
URL: https://github.com/llvm/llvm-project/commit/5364b36868210364b2ccf8e9f9169ed1fd545ae0
DIFF: https://github.com/llvm/llvm-project/commit/5364b36868210364b2ccf8e9f9169ed1fd545ae0.diff
LOG: Revert "[Driver][Fuchsia][NFC] Use GetLinkerPath to see if linker is lld"
This reverts commit b9f4dff8ab40250aac2343e86c1289de46af5585.
Added:
Modified:
clang/lib/Driver/ToolChains/Fuchsia.cpp
Removed:
################################################################################
diff --git a/clang/lib/Driver/ToolChains/Fuchsia.cpp b/clang/lib/Driver/ToolChains/Fuchsia.cpp
index 1b60541ee846..9e0b259dfcae 100644
--- a/clang/lib/Driver/ToolChains/Fuchsia.cpp
+++ b/clang/lib/Driver/ToolChains/Fuchsia.cpp
@@ -53,9 +53,9 @@ void fuchsia::Linker::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back("-z");
CmdArgs.push_back("now");
- bool IsLLD;
- const char *Exec = Args.MakeArgString(ToolChain.GetLinkerPath(&IsLLD));
- if (IsLLD) {
+ 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")) {
CmdArgs.push_back("-z");
CmdArgs.push_back("rodynamic");
CmdArgs.push_back("-z");
More information about the cfe-commits
mailing list