Newer
Older
dub_jkp / changelog / static_libraries_exported_dll.dd
@richard (rikki) andrew cattermole richard (rikki) andrew cattermole on 5 Mar 2023 545 bytes Make all static library exports contribute to dlls on Windows
Static libraries now contribute towards DLL exports on Windows

Previously if you did not explicitly pull in an object file within a static library, it was elided by the linker automatically.
This pulls them in automatically for linkers compatible with Microsoft's linker via the ``/WHOLEARCHIVE:file`` flag. Supports LLD.

It does not affect executables, although DLL's being built as dependencies by DUB will include it.

If you have previously used a linker script (.def) or ``/WHOLEARCHIVE`` you may be able to remove them from your builds.