[clang] [clang][Driver] Set *LinkerIsLLD for all LLD linker paths in GetLinkerPath (PR #236027)
Roland McGrath via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 29 12:47:18 PDT 2026
================
@@ -1075,9 +1076,8 @@ void tools::addLTOOptions(const ToolChain &ToolChain, const ArgList &Args,
Input = Inputs.begin();
}
- if (Linker != "lld" && Linker != "lld-link" &&
- llvm::sys::path::filename(LinkerPath) != "ld.lld" &&
- llvm::sys::path::stem(LinkerPath) != "ld.lld" && !Triple.isOSOpenBSD()) {
+ if (!LinkerIsLLD && Linker != "lld" && Linker != "lld-link" &&
----------------
frobtech wrote:
Done. `GetLinkerPath(&LinkerIsLLD)` already covers `-fuse-ld=lld` (both standalone and with `--ld-path=`), and `addLTOOptions` is only used by toolchains that use `GetLinkerPath`, so the extra `Linker` check is no longer needed.
https://github.com/llvm/llvm-project/pull/236027
More information about the cfe-commits
mailing list