-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Dependency Scanning] Scan header inputs of binary Swift module dependencies #72067
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
[Dependency Scanning] Scan header inputs of binary Swift module dependencies #72067
Conversation
f033fae
to
afb81a0
Compare
@swift-ci test |
Should we check both PCH and no-PCH build? I guess when you import binary module, the binary module itself will know it needs to import PCH or headers directly and all we care in the scanner is to figure out the module dependencies? |
The binary module we import, when built with PCH or non-PCH, will still just serialize the path to the |
So those also needs be absolute path that exists on the file system of the client? As I don't expect client to setup search path to find the header. And the client will do an implicit PCH build before importing into clang importer? |
We also serialize the contents of the
Yes, that's accurate. The clients are not able to load the PCH directly, if one was previously built, because its build context is not guaranteed to match. |
I see. Now I feel stronger about making bridging header dependencies a separate entry in the future so we can teach build system to schedule explicit PCH builds for source module and binary module. |
afb81a0
to
e0402a9
Compare
@swift-ci test |
e0402a9
to
49bca81
Compare
@swift-ci test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM in general with some comments.
…dencies Otherwise they may have module dependencies of their own which will not be detected by the scanner and included in the list of explicit inputs for compilation.
49bca81
to
bfa8c0e
Compare
@swift-ci test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM
…er inputs of binary module dependencies As of swiftlang/swift#72067, we instead serialize `.h` inputs directly into binary `.swiftmodule` files, because their clients may not be able to use the dependnecies' corresponding `.pch` files due to a compilation context mismatch. The clients of such binary modules then consume the serialized `.h` files directly, and compile them, implicitly, using explicit module dependencies collected during scan of such header files. Resolves rdar://131261765
…er inputs of binary module dependencies As of swiftlang/swift#72067, we instead serialize `.h` inputs directly into binary `.swiftmodule` files, because their clients may not be able to use the dependnecies' corresponding `.pch` files due to a compilation context mismatch. The clients of such binary modules then consume the serialized `.h` files directly, and compile them, implicitly, using explicit module dependencies collected during scan of such header files. Resolves rdar://131261765
…er inputs of binary module dependencies As of swiftlang/swift#72067, we instead serialize `.h` inputs directly into binary `.swiftmodule` files, because their clients may not be able to use the dependnecies' corresponding `.pch` files due to a compilation context mismatch. The clients of such binary modules then consume the serialized `.h` files directly, and compile them, implicitly, using explicit module dependencies collected during scan of such header files. Resolves rdar://131261765
…er inputs of binary module dependencies As of swiftlang/swift#72067, we instead serialize `.h` inputs directly into binary `.swiftmodule` files, because their clients may not be able to use the dependnecies' corresponding `.pch` files due to a compilation context mismatch. The clients of such binary modules then consume the serialized `.h` files directly, and compile them, implicitly, using explicit module dependencies collected during scan of such header files. Resolves rdar://131261765
Otherwise they may have module dependencies of their own which will not be detected by the scanner and included in the list of explicit inputs for compilation.
These header inputs typically occur on binary Swift modules which were built with a bridging header.