Files
llvm/lld/test/COFF
Frankie Robertson 86cbb36b36 [lld] Add (ignored) /link flag to lld-link for compatibility with MSVC link.exe (#168364)
Various build tools may produce command lines invoking clang-cl and
lld-link which contain /link twice like so: e.g. `clang-cl.exe
sanitycheckcpp.cc /Fesanitycheckcpp.exe .... /link /link ...`

If link.exe is used, it ignores the extra `/link` and just issues a
warning, however lld-link tries to treat `/link` as a file name.

This PR adds a flag which is ignored in order to improve compatibility
with link.exe

There's some extra context including an "in-the-wild" example and
reproducer of the problem here:
https://github.com/frankier/meson_clang_win_activation

Co-authored-by: Frankie Robertson <frankie@robertson.name>
2025-11-21 16:41:29 -05:00
..