================
@@ -301,11 +301,7 @@ constructHexagonLinkArgs(Compilation &C, const JobAction
&JA,
bool IncStartFiles = !Args.hasArg(options::OPT_nostartfiles);
bool IncDefLibs = !Args.hasArg(options::OPT_nodefaultlibs);
bool UseLLD = false;
- const char *Exec = Args.MakeArgString(HTC.GetLinkerPath(&UseLLD));
- StringRef LinkerName = llvm::sys::path::filename(Exec);
- UseLLD = UseLLD || LinkerName.starts_with("ld.lld") ||
- LinkerName.ends_with("ld.lld") ||
- llvm::sys::path::stem(Exec).ends_with("ld.lld");
+ (void)HTC.GetLinkerPath(&UseLLD);
----------------
petrhosek wrote:
We call `HTC.GetLinkerPath` also in
[`Linker::ConstructJob`](https://github.com/frobtech/llvm-project/blob/70c4d893e83708527ae17a348dea30bc323e902f/clang/lib/Driver/ToolChains/Hexagon.cpp#L554).
Ideally we would reorder the call there and pass `UseLLD` into this function
since that's the only thing we need here. Darwin driver uses the same approach.
https://github.com/llvm/llvm-project/pull/236027
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits