Skip to content

Conversation

egorzhdan
Copy link
Contributor

Explanation: Projects that use C++ interop for some of the Swift targets were failing to build in test mode (swift test) because the generated test entry point target wasn't being compiled with C++ interop enabled.
Scope: Flags that are being passed to the entry point test target.
Risk: Low, this only affects projects that explicitly enable C++ interop in the package manifest on non-Darwin platforms only.
Testing: Added a build plan test.
Issue: rdar://125498997
Reviewer: @MaxDesiatov approved #7428.

(cherry picked from commit f529dae)

### Motivation:

Projects that use C++ interop for some of the Swift targets were failing
to build in test mode (`swift test`) because the generated test entry
point target wasn't being compiled with C++ interop enabled.

### Modifications:

The logic that propagates the C++ interop compiler flag
(`-cxx-interoperability-mode`) to the discovery target now also runs for
the entry point target.

rdar://125498997
(cherry picked from commit f529dae)
@egorzhdan
Copy link
Contributor Author

@swift-ci please test

@egorzhdan egorzhdan added the swift 6.0 Related to Swift 6.0 release branch label Mar 28, 2024
@egorzhdan egorzhdan enabled auto-merge (squash) March 28, 2024 16:13
@egorzhdan egorzhdan merged commit 76e7523 into release/6.0 Apr 3, 2024
@egorzhdan egorzhdan deleted the egorzhdan/6.0-cxx-interop-flag-entry-point branch April 3, 2024 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
swift 6.0 Related to Swift 6.0 release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants