[lld] [LLD] [MinGW] Fall back to using default target if no -m flag given. (PR #134700)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 8 13:35:58 PDT 2025


https://github.com/mstorsjo approved this pull request.

For context here; normally if one invokes `ld.lld` without an `-m` flag, it would run the ELF linker. However, if LLD is built with the CMake option `LLD_DEFAULT_LD_LLD_IS_MINGW` enabled, then `ld.lld` without an `-m` flag invokes the MinGW linker instead. In such a setup, this PR allows using the default target triple for checking whether we should assume i386 specific behaviours, when no `-m` option is present.

I believe this is a reasonable thing to do, so I'll approve the change, and can merge it after leaving some time for others to comment/disagree on it. If there's no disagreement, I can merge it after a day or two.

https://github.com/llvm/llvm-project/pull/134700


More information about the llvm-commits mailing list