-
Notifications
You must be signed in to change notification settings - Fork 212
[Explicit Module Builds] Rely on Clang dependencies' ContextHash to determine the PCM output filename #1219
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
Conversation
621f130
to
39d3f18
Compare
@swift-ci test |
39d3f18
to
89c6813
Compare
@swift-ci test |
89c6813
to
a161764
Compare
@swift-ci test |
a161764
to
18aaa94
Compare
@swift-ci test |
…etermine the PCM output filename The driver previously implemented a scheme where it computed an output path for the PCMs of clang module dependencies by hashing the command-line used to build the PCM plus a set of special arguments determined by the depending Swift module that made the PCM unique to the depending Swift module in the build graph. This was previously done first and foremost to accomodate the fact that we used to have Clang modules built against different target triples in the build graph. The driver would previously execute a dependency scan, and follow it up with a re-scan of relevant clang modules which we require to have dependency info about at a target triple that is different from the main module's target triple. With the introduction of '-clang-target', we are aiming to ensure that '-target' triple of all Clang modules built matches that of the top-level Swift main module being built; therefore, making re-scanning and manual hashing of the PCM output filename unnecessary.
18aaa94
to
36f08da
Compare
@swift-ci test |
To refresh my memory about this, why are these special arguments not part of the PCM building command? |
The only example really is a depending Swift module's target triple. Say we're building main module The dependency scan is done with the specified target of the main module - macOS 11.0, but when building Then during planning, we would note that Now that we have settled on a scheme where we aim to only build modules for a single target (that of the main module), I am hoping we can move away from this scheme entirely. Simply execute a scan at the main module triple and use the results of this scan to form a complete build graph. In my testing, since we introduced the notion of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. Thank you for explaining the details!
The driver previously implemented a scheme where it computed an output path for the PCMs of clang module dependencies by hashing the command-line used to build the PCM plus a set of special arguments determined by the depending Swift module that made the PCM unique to the depending Swift module in the build graph. This was previously done first and foremost to accomodate the fact that we used to have Clang modules built against different target triples in the build graph.
The driver would previously execute a dependency scan, and follow it up with a re-scan of relevant clang modules which we require to have dependency info about at a target triple that is different from the main module's target triple. With the introduction of '-clang-target', we are aiming to ensure that '-target' triple of all Clang modules built matches that of the top-level Swift main module being built; therefore, making re-scanning and manual hashing of the PCM output filename unnecessary.