[clang] [Clang][Driver] Revise Cygwin ToolChain to call linker directly (PR #147960)

Tomohiro Kashiwada via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 17 03:13:45 PDT 2025


kikairoya wrote:

> $ clang++ -fuse-ld=lld hello.cc

Do you have patched to LLD locally? This should fail with `unable to find library -lkernel32`.


> But it would mean that using gcc -fuse-ld=lld wouldn't work due to wrong defaults.

LLD and Clang are both part of LLVM, so they should be expected to work together without requiring extra hacky options. For GCC, we can patch its driver downstream if necessary -- though ideally, this should be addressed upstream, assuming the GCC maintainers are open to it.

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


More information about the cfe-commits mailing list