Skip to content

Cherry-picks from upstream llvm.org that make PCH files output path independent #5091

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

akyrtzi
Copy link

@akyrtzi akyrtzi commented Aug 10, 2022

No description provided.

akyrtzi added 4 commits August 9, 2022 22:10
…utputFile` in some of `ASTWriter` functions, NFC

This is to make it consistent with LLVM's string parameter passing convention.
… write out information about its output path

This is useful to enable sharing of the same PCH file even when it's intended for a different output path.

The only information this option disables writing is for `ORIGINAL_PCH_DIR` record which is treated as optional and (when present) used as fallback for resolving input file paths relative to it.

Differential Revision: https://reviews.llvm.org/D130710
Use of `ORIGINAL_PCH_DIR` record has been superseeded by making PCH/PCM files with relocatable paths at write time.
Removing this record is useful for producing an output-path-independent PCH file and enable sharing of the same PCH file even
when it was intended for a different output path.

Differential Revision: https://reviews.llvm.org/D131124
@akyrtzi
Copy link
Author

akyrtzi commented Aug 10, 2022

@swift-ci Please test

@akyrtzi akyrtzi merged commit accf2a2 into swiftlang:stable/20220421 Aug 10, 2022
@akyrtzi akyrtzi deleted the pr/stable-picks-pch-out-independent branch August 10, 2022 15:08
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.

1 participant