Skip to content

[Driver][Index] Add driver support to specify an overriding output path to record in the index data #36272

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

Conversation

nathawes
Copy link
Contributor

@nathawes nathawes commented Mar 4, 2021

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 new driver here: swiftlang/swift-driver#516

Resolves rdar://problem/74816412

@nathawes
Copy link
Contributor Author

nathawes commented Mar 4, 2021

@swift-ci please test

@swift-ci
Copy link
Contributor

swift-ci commented Mar 4, 2021

Build failed
Swift Test Linux Platform
Git Sha - c3c3ad405e0ec46f5a4ba4838c8bf4102de1b771

@swift-ci
Copy link
Contributor

swift-ci commented Mar 4, 2021

Build failed
Swift Test OS X Platform
Git Sha - c3c3ad405e0ec46f5a4ba4838c8bf4102de1b771

@nathawes
Copy link
Contributor Author

nathawes commented Mar 5, 2021

@swift-ci please test

@nathawes nathawes requested review from akyrtzi and CodaFi March 5, 2021 00:50
@nathawes nathawes marked this pull request as ready for review March 5, 2021 00:51
@nathawes nathawes force-pushed the update-driver-for-index-unit-output-path branch from c3c3ad4 to a669ab2 Compare March 5, 2021 01:32
@nathawes
Copy link
Contributor Author

nathawes commented Mar 5, 2021

@swift-ci please test

@nathawes nathawes force-pushed the update-driver-for-index-unit-output-path branch from a669ab2 to a39ec56 Compare March 5, 2021 01:36
@nathawes
Copy link
Contributor Author

nathawes commented Mar 5, 2021

@swift-ci please test

@nathawes
Copy link
Contributor Author

nathawes commented Mar 5, 2021

@swift-ci please test

@nathawes
Copy link
Contributor Author

nathawes commented Mar 5, 2021

@swift-ci please test Windows

1 similar comment
@nathawes
Copy link
Contributor Author

nathawes commented Mar 5, 2021

@swift-ci please test Windows

@nathawes nathawes force-pushed the update-driver-for-index-unit-output-path branch from 701bca4 to 348a2be Compare March 5, 2021 05:34
@nathawes
Copy link
Contributor Author

nathawes commented Mar 5, 2021

@swift-ci please test

@swift-ci
Copy link
Contributor

swift-ci commented Mar 5, 2021

Build failed
Swift Test Linux Platform
Git Sha - 348a2be1236f73efbbe1cec3ab5ec2a087820802

@nathawes
Copy link
Contributor Author

nathawes commented Mar 6, 2021

@swift-ci please smoke test Linux

…th to record in 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
@nathawes nathawes force-pushed the update-driver-for-index-unit-output-path branch from 348a2be to 117f03b Compare March 6, 2021 04:26
@nathawes
Copy link
Contributor Author

nathawes commented Mar 6, 2021

@swift-ci please test and merge

@swift-ci swift-ci merged commit e82fd4a into swiftlang:main Mar 6, 2021
@nathawes nathawes deleted the update-driver-for-index-unit-output-path branch March 6, 2021 12:31
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