Skip to content
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

[Feature Request] Explicit clang modules #1475

Open
yongjincho92 opened this issue Jan 16, 2025 · 1 comment
Open

[Feature Request] Explicit clang modules #1475

yongjincho92 opened this issue Jan 16, 2025 · 1 comment

Comments

@yongjincho92
Copy link

Context

Explicit module for swift helps with build speed by reducing the duplicated pcm file generation (via compilation). Implicit clang modules are used for Swift / Obj-C interop most commonly.

Build speed improvement comes from 1) not having to generate duplicate pcm files and 2) pcm files become explicit outputs of bazel compile actions making Bazel's action scheduling more efficient.

In Snapchat, we used to use clang modules for all objective-c library targets by default for Swift inter-op. But we realized the overhead from implicit clang modules, and changed to creating clang modules only when objective-c library is depended on by swift target. As a result, we were able to see ~50% improvement in clean full application build time (~40 --> ~20min).

@yongjincho92
Copy link
Author

@luispadron @brentleyjones created the feature request per discussion from the rules_swift meeting.

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

No branches or pull requests

1 participant