Re: [Mingw-w64-public] [PATCH] Remove empty and unused libraries
On Thursday 03 September 2026 12:05:57 Jacek Caban wrote: > On 9/2/26 21:48, Zhongteng Gui wrote: > > But for seldom used libraries like > > libdelayimp.a, maybe it'd be better to finally remove them after 1 or 2 > > major > > versions after deprecating, as this also help downstreams to update their > > usage > > timely. > > > No, delayimp import is required when using delayload on MSVC and projects > are free to unconditionally import it. If you'd remove it, you'd force such > project to complicate their build systems addubg some conditional import > depending on if it's built for msvc or mingw. That's not an improvement. It > was added in 31c8591f01f336 to fix building Firefox and I think the reason > still applies. > > > I think it's fine to remove empty libraries that are actually useless, but > being empty does not automatically imply useless. > > > Jacek > I agree. The metric which calculate size of library or number of object files in library is mostly wrong. The important is if the library is working, is non-broken or if is useful. Those are two different things, and as can be seen even the empty library is useful, is working and is required. ___ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] [PATCH] Remove empty and unused libraries
On 9/2/26 21:48, Zhongteng Gui wrote: But for seldom used libraries like libdelayimp.a, maybe it'd be better to finally remove them after 1 or 2 major versions after deprecating, as this also help downstreams to update their usage timely. No, delayimp import is required when using delayload on MSVC and projects are free to unconditionally import it. If you'd remove it, you'd force such project to complicate their build systems addubg some conditional import depending on if it's built for msvc or mingw. That's not an improvement. It was added in 31c8591f01f336 to fix building Firefox and I think the reason still applies. I think it's fine to remove empty libraries that are actually useless, but being empty does not automatically imply useless. Jacek ___ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] [PATCH] Remove empty and unused libraries
On 2026/09/03 03:33, Pali Rohár wrote: > On Thursday 03 September 2026 03:18:58 Zhongteng Gui wrote: >> On 2026/09/03 02:26, Pali Rohár wrote: >>> liblargeint.a is also for MSVC compatibility. Older versions provided >>> static largeint.lib library which applications could statically link. >> >> Do we really need to provide this type of "compatiblity"? > > Probably not. I'm writing it just for the context. > >> Searching GitHub for "-llargeint" [1] matches only 10 code snippet, which I >> think is rare enough for us to no longer provide it. Searching for >> "liblargeint.a" [2] matches 0 real usage. For other potential usage of it >> (e.g. >> largeint.lib), they always have to be patched before use, and there's little >> difference between patching 'largeint.lib' to '-llargeint' or simply >> removing it. > > Zero usage of "liblargeint.a" is not a surprise. gcc/ld needs "-llargeint" > syntax. > >> The similar logic also applies to libdelayimp.a, though this is a little more >> complicated (or confusing), because people may expect this is required if >> they >> want to use "delay import", which is a relatively new feature compared to >> largeint. > > Apparently not. Both largeint.lib and delayimp.lib were introduced in > same version: Visual C++ 6.0. And so it is not a "new feature" but rather > very old feature. Thanks for pointing out this. I'm not very familiar with the history of these libraries. > >> And indeed there're more usage of `-ldelayimp` on GitHub (~200), >> though many of them seemes to be intended for MSVC (either explicitly >> specifies >> "NOT VCPKG_TARGET_IS_MINGW", or used with "/DELAYLOAD:", or searching from >> Windows Kits explicitly.) >> >> [1]: https://github.com/search?q=-llargeint&type=code >> [2]: https://github.com/search?q=liblargeint.a&type=code > > I'm not opposing the change, I just wanted to write information about it > for completeness. It could be useful to have and to know such thing why > such lib existed there. > > The more important is that the-now-removed mingw-w64 liblargeint.a > is/was broken. This library did not provide required functions symbols > for largeint support and also no other mingw-w64 provides them. Reason > was that all function symbols were commented and also the header file > was missing. > > So from my point of view: It makes sense to remove broken largeint > support if nobody is going to fix it (which is obvious as there is > mostly no user of it). > > The delayimp is different. mingw-w64 provides delayimp symbols, just > they are in other library which is automatically linked to every binary. > So mingw-w64 has delayimp support and I mostly do not see a reason for > removing it (as there is probably zero maintenance for its "empty" > library). Maybe we can declare these compatiable empty libraries as "deprecated", then finally remove them after a few major versions? I don't think it's a good idea to infinitely provide an empty library, even if it doesn't need much maintaince currently. For common used libraries (e.g. libmingwex.a, if it's really merged into other libraries as discussed previously and becomes empty), I agree we should provide them for a long enough time. But for seldom used libraries like libdelayimp.a, maybe it'd be better to finally remove them after 1 or 2 major versions after deprecating, as this also help downstreams to update their usage timely. ___ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] [PATCH] Remove empty and unused libraries
On Thursday 03 September 2026 03:18:58 Zhongteng Gui wrote: > On 2026/09/03 02:26, Pali Rohár wrote: > > liblargeint.a is also for MSVC compatibility. Older versions provided > > static largeint.lib library which applications could statically link. > > Do we really need to provide this type of "compatiblity"? Probably not. I'm writing it just for the context. > Searching GitHub for "-llargeint" [1] matches only 10 code snippet, which I > think is rare enough for us to no longer provide it. Searching for > "liblargeint.a" [2] matches 0 real usage. For other potential usage of it > (e.g. > largeint.lib), they always have to be patched before use, and there's little > difference between patching 'largeint.lib' to '-llargeint' or simply removing > it. Zero usage of "liblargeint.a" is not a surprise. gcc/ld needs "-llargeint" syntax. > The similar logic also applies to libdelayimp.a, though this is a little more > complicated (or confusing), because people may expect this is required if they > want to use "delay import", which is a relatively new feature compared to > largeint. Apparently not. Both largeint.lib and delayimp.lib were introduced in same version: Visual C++ 6.0. And so it is not a "new feature" but rather very old feature. > And indeed there're more usage of `-ldelayimp` on GitHub (~200), > though many of them seemes to be intended for MSVC (either explicitly > specifies > "NOT VCPKG_TARGET_IS_MINGW", or used with "/DELAYLOAD:", or searching from > Windows Kits explicitly.) > > [1]: https://github.com/search?q=-llargeint&type=code > [2]: https://github.com/search?q=liblargeint.a&type=code I'm not opposing the change, I just wanted to write information about it for completeness. It could be useful to have and to know such thing why such lib existed there. The more important is that the-now-removed mingw-w64 liblargeint.a is/was broken. This library did not provide required functions symbols for largeint support and also no other mingw-w64 provides them. Reason was that all function symbols were commented and also the header file was missing. So from my point of view: It makes sense to remove broken largeint support if nobody is going to fix it (which is obvious as there is mostly no user of it). The delayimp is different. mingw-w64 provides delayimp symbols, just they are in other library which is automatically linked to every binary. So mingw-w64 has delayimp support and I mostly do not see a reason for removing it (as there is probably zero maintenance for its "empty" library). ___ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] [PATCH] Remove empty and unused libraries
On 2026/09/03 02:26, Pali Rohár wrote: > liblargeint.a is also for MSVC compatibility. Older versions provided > static largeint.lib library which applications could statically link. Do we really need to provide this type of "compatiblity"? Searching GitHub for "-llargeint" [1] matches only 10 code snippet, which I think is rare enough for us to no longer provide it. Searching for "liblargeint.a" [2] matches 0 real usage. For other potential usage of it (e.g. largeint.lib), they always have to be patched before use, and there's little difference between patching 'largeint.lib' to '-llargeint' or simply removing it. The similar logic also applies to libdelayimp.a, though this is a little more complicated (or confusing), because people may expect this is required if they want to use "delay import", which is a relatively new feature compared to largeint. And indeed there're more usage of `-ldelayimp` on GitHub (~200), though many of them seemes to be intended for MSVC (either explicitly specifies "NOT VCPKG_TARGET_IS_MINGW", or used with "/DELAYLOAD:", or searching from Windows Kits explicitly.) [1]: https://github.com/search?q=-llargeint&type=code [2]: https://github.com/search?q=liblargeint.a&type=code ___ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] [PATCH] Remove empty and unused libraries
liblargeint.a is also for MSVC compatibility. Older versions provided static largeint.lib library which applications could statically link. ___ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] [PATCH] Remove empty and unused libraries
On 8/29/26 20:44, Zhongteng Gui wrote: Hi, here're 2 patches that remove libdelayimp.a and liblargeint.a, which are not only empty, but also nearly never used. It's worth noting that libdelayimp.a is actually irrelevant to the "delay loading" feature, instead, this is provided by delayimp.c, which is linked into libmingwex.a libdelayimp.a is for MSVC compatibility, which provides delayimp.lib and thus applications may assume that they can link against it. Thanks, Jacek ___ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] [PATCH] Remove empty and unused libraries
On 2026/08/31 15:23, LIU Hao wrote: > 在 2026-8-30 02:44, Zhongteng Gui 写道: >> Hi, here're 2 patches that remove libdelayimp.a and liblargeint.a, which are >> not >> only empty, but also nearly never used. It's worth noting that libdelayimp.a >> is >> actually irrelevant to the "delay loading" feature, instead, this is >> provided by >> delayimp.c, which is linked into libmingwex.a. > There is a reference to delayimp: https://github.com/msys2/MINGW-packages/ > blob/22033afbdbc315e0194d7a4ae8a0a4926d6afa38/mingw-w64-nodejs/0103-node-gyp- > support-mingw-toolchain.patch#L44 Thanks for pointing out this. I've done a more careful search in MSYS2, and I think now all references to delayimp have been removed. See also: https://github.com/msys2/MINGW-packages/compare/ae8e6a088a94d0919f75274a186b4345f8e5f1fa...45a5b1d5affda8be25d94acd7ad213eda19dfe32 > > The second patch looks good though. I have pushed it with a grammatical fix in > the message (show => shows). > > ___ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] [PATCH] Remove empty and unused libraries
在 2026-8-30 02:44, Zhongteng Gui 写道: Hi, here're 2 patches that remove libdelayimp.a and liblargeint.a, which are not only empty, but also nearly never used. It's worth noting that libdelayimp.a is actually irrelevant to the "delay loading" feature, instead, this is provided by delayimp.c, which is linked into libmingwex.a. There is a reference to delayimp: https://github.com/msys2/MINGW-packages/blob/22033afbdbc315e0194d7a4ae8a0a4926d6afa38/mingw-w64-nodejs/0103-node-gyp-support-mingw-toolchain.patch#L44 The second patch looks good though. I have pushed it with a grammatical fix in the message (show => shows). -- Best regards, LIU Hao OpenPGP_signature.asc Description: OpenPGP digital signature ___ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
