-
Notifications
You must be signed in to change notification settings - Fork 204
Add driver support to specify an overriding output path to record in the index data #516
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
@swift-ci please test |
0bb1713
to
57c9789
Compare
@swift-ci please test |
57c9789
to
b990ca9
Compare
@swift-ci please test |
b990ca9
to
4652a29
Compare
@swift-ci please 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.
The way we generate options in swift-driver
makes it preferable to first merge the options update in swift
, and then automatically re-generate here from that and then merge.
But other than that this change looks good!
/// Output path to record in the indexing data store | ||
/// | ||
/// This is only needed for use as a key in the output file map. | ||
case indexUnitOutputPath |
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.
Hmm, I'm now realizing that indexData
is the same pattern; but, everything else here is a file type, whereas indexData
and indexUnitOutputPath
are just directories.
It may be worth refactoring in the future to be a common directory FileType
, with an enum associated value for the specific kind of directory. But it's alright in this PR.
…the index data The frontend supports this via new options -index-unit-output-path and -index-unit-output-path-filelist that mirror -o and -output-filelist. These are intended to allow sharing index data across builds in separate directories (so different -o values) that are otherwise equivalent as far as the index data is concerned (e.g. an ASAN build and a non-ASAN build) by supplying the same -index-unit-output-path for both. This change updates the driver to add these new options to the frontend invocation 1) when a new "index-unit-output-path" entry is specified for one or more input files in the -output-file-map json or 2) if -index-file is specified, when a new -index-unit-output-path driver option is passed. Resolves rdar://problem/74816412
4652a29
to
9da73a9
Compare
@swift-ci test and merge |
@swift-ci please test |
The frontend supports this via new options -index-unit-output-path and -index-unit-output-path-filelist that mirror -o and -output-filelist. These are intended to allow sharing index data across builds in separate directories (so different -o values) that are otherwise equivalent as far as the index data is concerned (e.g. an ASAN build and a non-ASAN build) by supplying the same -index-unit-output-path for both.
This change updates the driver to add these new options to the frontend invocation 1) when a new "index-unit-output-path" entry is specified for one or more input files in the -output-file-map json or 2) when -index-file is specified (guaranteeing a single primary input) and a new -index-unit-output-path driver option is passed.
Equivalent change for the old driver here: swiftlang/swift#36272
Resolves rdar://problem/74816412