[clang] CodeGen: support static linking for libclosure (PR #125384)

Saleem Abdulrasool via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 3 14:16:43 PST 2025


compnerd wrote:

The other way works with warnings and some performance loss and code bloat (linking code designed for DLL as static).

So far I've always mandated dynamic linking for BlocksRuntime on Windows within the Swift toolchain and by the Swift toolchain.

You are correct that the `-static-libclosure` does not impact linking but rather the CodeGen. The problem here is that there are well known types that are referenced by the compiler and are not guaranteed to be forward declare (it would be akin to requiring users to forward declare C++ ABI symbols in client code manually).

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


More information about the cfe-commits mailing list