================
@@ -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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits