Skip to content

Turn on emit-module-separately for whole-module builds by default #922

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
merged 5 commits into from
Dec 21, 2021

Conversation

xymus
Copy link
Contributor

@xymus xymus commented Dec 2, 2021

Scheduling a separate emit-module job for whole-module builds, combined with the integrated driver in the build system, will allow to parallelize what used to be essentially sequential builds. This mode unblocks building dependents early by duplicating some work in two processes, it requires more cpu work for a faster wall clock build time. Another advantage of this mode is the resulting swiftmodule is lighter from a classic whole-module build.

rdar://85976762

Scheduling a separate emit-module job for whole-module builds, combined
with the integrated driver in the build system, will allow to
parallelize what used to be essentially sequential builds. This mode
unblocks building dependents early by duplicating some work in two
processes, it requires more cpu work for a faster wall clock build time.
Another advantage of this mode is the resulting swiftmodule is lighter
from a classic whole-module build.

rdar://85976762
@xymus
Copy link
Contributor Author

xymus commented Dec 2, 2021

I put this up as is to run tests. I expect this to break a lot of tests, here and in the compiler.

@swift-ci Please test

@xymus
Copy link
Contributor Author

xymus commented Dec 3, 2021

@swift-ci Please test

@xymus
Copy link
Contributor Author

xymus commented Dec 3, 2021

@swift-ci Please test

@xymus
Copy link
Contributor Author

xymus commented Dec 3, 2021

More tests are failing this time, it's a good sign. The first version scheduled the separate emit-module job only when the -emit-module flag was passed explicitly, not for other module-wide outputs.

@xymus xymus force-pushed the ems-wmo-by-default branch from 3e2658d to e0db4cb Compare December 4, 2021 00:26
@xymus
Copy link
Contributor Author

xymus commented Dec 4, 2021

@swift-ci Please test

@xymus xymus force-pushed the ems-wmo-by-default branch from e0db4cb to d887353 Compare December 7, 2021 17:49
@xymus
Copy link
Contributor Author

xymus commented Dec 7, 2021

@swift-ci Please test

@xymus
Copy link
Contributor Author

xymus commented Dec 7, 2021

The tests look good here and on the compiler side. I think this is ready for review!

@xymus xymus requested review from nkcsgexi and artemcm December 7, 2021 19:47
@xymus xymus merged commit 18f043b into swiftlang:main Dec 21, 2021
@xymus xymus deleted the ems-wmo-by-default branch December 21, 2021 00:28
@artemcm
Copy link
Contributor

artemcm commented Dec 21, 2021

🚢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants