Closed MaddTheSane closed 4 months ago
An alternative to marking specific symbols as exportable in the source code is to have an exported symbols list that is passed to the linker. The problem is, macOS and Windows start each symbol with an underscore, while Linux/other UNIXes do not. This would resolve the DMFC symbols being exported, though.
I did some research on this subject and came up with some possible downsides:
- It doesn't just target net games, but also the level scripts.
- If you feel like this is too soon, you can wait until the project is a bit more mature.
@jcoby @winterheart @Arcnor What do you think?
I have little experience on dll using, but changes looks fine for me.
Pull Request Type
Description
This changes the visibility of the symbols of the plug-ins, the net games, and the TCP/IP net module. This can be great for LTO and dead code stripping, as only exported symbols (and symbols that the exported symbols reference) are included, reducing the size of linked objects.
Checklist
Additional Comments
Due to how DMFC is statically-linked and built for Linux and macOS, a lot of the DMFC symbols will still be exported. The next part would be changing visibility of the DMFC library for macOS and Linux to not export its symbols if they're not building for Windows.