Open
Description
(FYI, there is a history here; we used to do selective export, but it proved hard to maintain, for various reasons, and we ended up abandoning it. Opening a new issue for future discussion would be worthwhile.)
Originally posted by @steven-johnson in #4644
CMake provides a GenerateExportHeader module that makes it somewhat easier to selectively export library symbols in a cross-compiler-compatible way. That, along with testing discipline to cover all the symbols we want to export, should ease the maintenance burden.
(Please feel free to edit the following two lists)
The pros of doing this include:
- Smaller binary sizes
- Think of all the inlined template instantiations!
- Explicit API surface, which would make it easier to assign semantic version numbers, rather than dates.
- If we remove an export declaration, bump the major version; if we add one, bump the minor; if we want to release changes without touching any of these, bump the patch.
Cons:
- Potentially difficult to implement in the Makefile, though it only supports POSIX OSes and GCC-compatible compilers.
- Maintenance was historically a burden. Why?