[ExplictModule] Bridgingheader chaining mode
Add a new experimental flag for better bridging header handling from a binary module dependency. The new mode requries the users of such binary module to provide bridging header that chains the bridging header from the dependencies, otherwise it will result in an scanning error.
While this requires users of the module explicitly add bridging headers from the dependencies, it has the benefits:
- Cheaper dependency scanning as bridging header will only need to be scanned once for all bridging headers discovered.
- Avoid hard to understand header import errors when importing bridging headers.
- Some compiler directives like
#pragma oncewill function correctly only when bridging headers are chained together. - Easy to be supported in swift caching mode as swift-frontend will not import clang headers that lack complete dependencies.
Alternatively, we can go one step further to generate the chained bridging header but I don't have a good model for how that should work between swift-driver and frontend.
@swift-ci please test
@swift-ci please smoke test