Only compile source of dependencies needed for project
Not sure whether we currently have a mechanism to discard disconnected target graphs from the compilation which are not needed for any module in the library. It could be beneficial to only compile source code we actually use in our project, however we have to be careful to not discard non-module functions (either bind(c) or declared outside of a module).
This way we could depend on stdlib without having to worry about a too large single file version which can't be compiled anymore and lose our most important bootstrap mechanism.
For stdlib specifically, I've been thinking it would be nice to have the possibility to only download/build selected modules specified in the manifest. I think what you are suggesting here is precisely this, however fpm would still be required to parse everything.
This should be possible and is something I have thought would be useful.
... however we have to be careful to not discard non-module functions
The same goes for submodule objects which are not technically part of the module dependency tree (hence #556).
The same goes for submodule objects which are not technically part of the module dependency tree (hence #556).
Would a weak/link-time dependency of the archive or the executable target help to capture the complete graph?
Would a weak/link-time dependency of the archive or the executable target help to capture the complete graph?
Yes, I think something like that would work.