Description
C++ interoperability can be enabled using the new .interoperabilityMode(.Cxx) setting.
We want to support a case where a Swift library target can enable C++ interoperability, but still be imported into another Swift target that doesn't enable C++ interoperability. That works today now that swiftlang/swift#65948 is fixed.
However, when an executable Swift target that depends on such Swift target gets linked, it doesn't use clang++ to link, i.e. it thinks that it can link the program as if C++ interop was not enabled in the entire dependency tree.
Expected behavior
SwiftPM should detect when an executableTarget depends on a Swift target that enables C++ interop and pass a flag to Swift driver that tells it that it should link as if interop is enabled.
Actual behavior
No response
Steps to reproduce
No response
Swift Package Manager version/commit hash
No response
Swift & OS version (output of swift --version ; uname -a)
No response