This is essentially a run-time version of LLD_DEFAULT_LD_LLD_IS_MINGW.
-fallback-gnu-driver must be the first argument (after -flavor, if it exists).
Differential D124999
ld.lld: Respect -fallback-gnu-driver. shlevy on May 5 2022, 3:48 AM. Authored by
Details
Diff Detail
Event TimelineComment Actions The description does not have information to justify why such an option is needed. I am on a trip so my response my be slow. Comment Actions We can split up the justification into two parts:
Comment Actions I guess the main question is that if you configure the default by passing an option (as opposed to an environment variable), why isn't it possible to achieve the same by just passing e.g. -m i386pep? I guess that's somewhat answered by 1. above - doing that loses the chance of letting the linker autodetect things, for the cases where that could be done. In practice though, I haven't yet used lld in a mingw context where the intended target architecture wasn't known at that point. I'm not familiar with NixOS, but for the cases where you'd want to set this default to make lld default to mingw behaviour, wouldn't you also know the intended architecture at the same time? Comment Actions I just saw your wrapper-script in llvm-mingw now. If the machine type is truly fixed once you fix the target triple prefix, then this is probably fine for my use case. Comment Actions If there is a way to achieve what you need without adding a new option, I assume this diff can be abandoned? Comment Actions I still think it makes sense in parallel to LLD_DEFAULT_LD_LLD_IS_MINGW, but my use case is met. |
clang-format not found in user’s local PATH; not linting file.