-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[CAS] Teach swift compiler to compute cache key and store outputs into CAS #65288
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
[CAS] Teach swift compiler to compute cache key and store outputs into CAS #65288
Conversation
@swift-ci please smoke test |
7dc4973
to
8206278
Compare
@swift-ci please test |
@swift-ci please smoke test |
8206278
to
eaa9963
Compare
@swift-ci please smoke test |
@swift-ci please smoke test macOS platform |
eaa9963
to
774a46f
Compare
@swift-ci please smoke test |
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.
LGTM, but please wait for at least one more reviewer to approve since I'm not that familiar with the swift frontend.
774a46f
to
b97eb93
Compare
@swift-ci please smoke test |
b97eb93
to
8b36ee8
Compare
@swift-ci please smoke test |
Teach swift how to serialize its input into CAS to create a cache key for compiler outputs. To compute the cache key for the output, it first needs to compute a base-key for the compiler invocation. The base key is computed from: swift compiler version and the command-line arguments for the invocation. Each compiler output from swift will gets its own key. The key for the output is computed from: the base key for the compiler invocation + the primary input for the output + the output type.
Add tool swift-cache-tool for caching related testing and inspection.
When `-enable-cas` option is used, mirror the output into CAS so it can be fetched from CAS with the cache key in the future.
Move all the declarations for SupplementaryOutputPaths to a def file to keep variables and function interfaces in sync.
8b36ee8
to
8d3d9b2
Compare
@swift-ci please smoke test |
@swift-ci please smoke test |
Teach swift compiler how to compute cache key and store outputs into CAS. It contains: