Skip to content

Only compile source of dependencies needed for project #635

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
awvwgk opened this issue Dec 13, 2021 · 4 comments
Open

Only compile source of dependencies needed for project #635

awvwgk opened this issue Dec 13, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@awvwgk
Copy link
Member

awvwgk commented Dec 13, 2021

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.

@awvwgk awvwgk added the enhancement New feature or request label Dec 13, 2021
@ivan-pi
Copy link
Member

ivan-pi commented Dec 14, 2021

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.

@LKedward
Copy link
Member

LKedward commented Dec 15, 2021

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).

@awvwgk
Copy link
Member Author

awvwgk commented Dec 15, 2021

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?

@LKedward
Copy link
Member

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.

@LKedward LKedward mentioned this issue Mar 13, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants