Skip to content

Conversation

@artemcm
Copy link
Contributor

@artemcm artemcm commented May 20, 2024

Cherry-pick of #69706

Explanation: This change is a collection of fixes that makes C++ Interoperability feature compatible with Explicitly-built modules.

  • Propagate the C++ Interop mode to interface sub-invocations and dependency scanner
  • Add required additional C++ Interop overlay module queries
  • Always add an implicit import of Cxx module when C++ Interop is enabled.
    • We cannot always rely on being able to do so only as an overlay query upon loading requires cplusplus modulemap modules. The requires statement only applies to submodules, and we may not be able to query language feature modulemap attributes in dependency scanning context.
  • Allow users to opt-out of implicit Cxx import with -disable-implicit-cxx-module-import

Risk: Low-Moderate. This change only affects code-paths for the C++ Interop feature. Primarily, though not exclusively when used in combination with Explicitly-Built modules.

Testing: Existing automated tests ensure that this change does not affect existing C++ Interop functionality.

Reviewed By: @egorzhdan

artemcm added 3 commits May 20, 2024 16:18
…bled.

We cannot always rely on being able to do so only as an overlay query upon loading 'requires cplusplus' modulemap modules. The 'requires' statement only applies to submodules, and we may not be able to query language feature modulemap attributes in dependency scanning context.
@artemcm artemcm requested a review from a team as a code owner May 20, 2024 23:20
@artemcm
Copy link
Contributor Author

artemcm commented May 20, 2024

@swift-ci test

@artemcm artemcm requested a review from nkcsgexi May 20, 2024 23:36
@artemcm artemcm force-pushed the 60DepScanCPPInterop branch from 352f3c2 to 298521b Compare May 21, 2024 16:00
@artemcm
Copy link
Contributor Author

artemcm commented May 21, 2024

@swift-ci test

@artemcm artemcm merged commit 1d2a23b into swiftlang:release/6.0 May 22, 2024
@artemcm artemcm deleted the 60DepScanCPPInterop branch May 22, 2024 04:14
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