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

via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 10 14:56:50 PDT 2025


jeremyd2019 wrote:

> > I was planning to refer to that, MinGW.cpp, and the GCC spec for Cygwin, and see if I could come up with a couple of places where virtual functions could be added to the MinGW::Linker class so that Cygwin::Linker could derive from it and override (I think the "wrap" stuff and list of default libraries)
> 
> +1 I think Cygwin-specific driver will not be maintained by others and will diverge and left alone from other platform or components. But, unfortunately, differences of MinGW and Cygwin are scattered widely so doing that isn't trivial I think. My hack (copy from MinGW.cpp) may help to see difference between MinGW and Cygwin. https://github.com/kikairoya/llvm-project/blob/cygwin-new-driver/clang/lib/Driver/ToolChains/Cygwin.cpp

I meant just the Linker class.  I don't think it's really possible to avoid a dedicated Cygwin driver, but I'm hoping it can keep close to the Generic_GCC base class rather than redoing so much stuff as MinGW did.

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


More information about the cfe-commits mailing list