Skip to content

[Build] NFC: Compute per-module macro requirements on-demand #7812

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

Merged

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Jul 23, 2024

Instead of having to go over all of the products and establish module -> product relationships during build plan construction let swift module build descriptions compute required macros based on their underlying modules as necessary.

Motivation:

Build plan is required to pre-compute macro requirements but that's expensive and shouldn't be necessary.

Modifications:

  • Instead of passing macro products to SwiftModuleBuildDescription all we need to pass are build parameters to use for macros and the macros themselves could be found based on the underlying module.

Result:

Build plan construction is slightly simpler and less expensive to compute, product and module descriptions could now be computed independently.

Instead of having to go over all of the products and establish
`module -> product` relationships during build plan construction
let swift module build descriptions compute required macros
based on their underlying modules as necessary.
@xedin
Copy link
Contributor Author

xedin commented Jul 23, 2024

@swift-ci please test

@MaxDesiatov MaxDesiatov added build system Changes to interactions with build systems performance Performance optimizations and improvements macros Support for macros labels Jul 24, 2024
@xedin xedin merged commit e7d756b into swiftlang:main Jul 25, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build system Changes to interactions with build systems macros Support for macros performance Performance optimizations and improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants