Skip to content

[cas] Add cc1 option -finclude-tree-preserve-pch-path #8575

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

benlangmuir
Copy link

  • Explanation: Currently, caching builds disable -gmodules due to concerns about stability of the PCH path. This change adds a new option to opt-in to using the PCH path as-is, which can be used by Swift since Swift PCH paths do not have this concern. With this option set, we then allow -gmodules, which fixes debugging Swift code, which is the motivation behind this change -- see [Caching] Adopt -finclude-tree-preserve-pch-path to fix -gmodules with swift#73038
  • Scope: Fixes debugging Swift code involving bridging header or clang modules. For Clang itself there should be no impact since it's off by default.
  • Issue: rdar://126370706
  • Original PR: [cas] Add cc1 option -finclude-tree-preserve-pch-path #8570
  • Risk: Low. This is only enabled for Swift caching builds, and should make them behave more like non-caching builds. Should have no negative impact, and no impact at all outside Swift.
  • Testing: Regression tests for both Swift and Clang changes, manually tested that caching builds now can debug with clang modules + bridging header types.
  • Reviewer: @cachemeifyoucan

Add the PCH path to the include tree, and add a way to control whether
we use the original PCH path, or if we canonicalize it away to <PCH>.
For now, keep the default being to canonicalize it to <PCH> as this
improves canonicalization. However, a client (e.g. Swift) that knows its
PCH path will be stable can use this option to allow enabling -gmodules,
which requires a real path.

rdar://126370706
(cherry picked from commit 67dab5f)
@benlangmuir
Copy link
Author

@swift-ci please test

@fredriss fredriss merged commit 5a302e4 into swift/release/6.0 Apr 16, 2024
@benlangmuir benlangmuir deleted the eng/blangmuir/finclude-tree-preserve-pch-path-6.0 branch April 16, 2024 15:29
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.

2 participants