You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[C++ interop] A Swift executable target that depends on a Swift library target that enables C++ interop should tell Swift to link using clang++, even when C++ interop is not enabled in the executable target
#6564
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: