This is an archive of the discontinued LLVM Phabricator instance.

[clang][modules][pch] Allow loading PCH with different modules cache path
ClosedPublic

Authored by jansvoboda11 on Jun 7 2021, 4:15 AM.

Details

Summary

It's useful to be able to load explicitly-built PCH files into an implicit build (e.g. during dependency scanning). That's currently impossible, since the explicitly-built PCH has an empty modules cache path, while the current compilation has (and needs to have) a valid path, triggering an error in the PCHValidator.

This patch adds a preprocessor option and command-line flag that can be used to omit this check.

Diff Detail

Event Timeline

jansvoboda11 created this revision.Jun 7 2021, 4:15 AM
jansvoboda11 requested review of this revision.Jun 7 2021, 4:15 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 7 2021, 4:15 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript

Mark as CC1Option

Remove CC1Option

This revision is now accepted and ready to land.Jun 13 2021, 1:08 PM
This revision was landed with ongoing or failed builds.Jun 14 2021, 2:05 AM
This revision was automatically updated to reflect the committed changes.