Skip to content
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

[BridgingHeader] Fix auto-chaining when only dependency has bridging header #79301

Merged
merged 1 commit into from
Feb 13, 2025

Conversation

cachemeifyoucan
Copy link
Contributor

When enable bridging header auto chaining, it is possible for the compilation to have a PCH file input for the bridging header from a binary swift module dependency. In this case, we should not report a bridging header for current module as bridging header can be leaking out through swiftinterface file.

To fully distinguish the PCH files passed in through different situation, here are the situations:

  • If no chaining is used, only -import-objc-header option is used and it can be used to pass either a header file or a PCH file depending if GeneratePCH job is requested or not.
  • If chaining is enabled, -import-objc-header is only used to pass the header file and -import-pch is used to pass PCH file. Chaining mode requires PCH generation if bridging header is used.

rdar://144623388

@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please smoke test

@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please smoke test

@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please test

…header

When enable bridging header auto chaining, it is possible for the
compilation to have a PCH file input for the bridging header from a
binary swift module dependency. In this case, we should not report a
bridging header for current module as bridging header can be leaking out
through swiftinterface file.

To fully distinguish the PCH files passed in through different
situation, here are the situations:
* If no chaining is used, only `-import-objc-header` option is used and
  it can be used to pass either a header file or a PCH file depending if
  GeneratePCH job is requested or not.
* If chaining is enabled, `-import-objc-header` is only used to pass the
  header file and `-import-pch` is used to pass PCH file. Chaining mode
  requires PCH generation if bridging header is used.

rdar://144623388
@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please smoke test

@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please test

@cachemeifyoucan
Copy link
Contributor Author

ping

@cachemeifyoucan cachemeifyoucan merged commit c42268e into swiftlang:main Feb 13, 2025
5 checks passed
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