Skip to content
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

[cxx-interop] Add -cxx-interoperability-mode driver flag; deprecate `-… #64088

Merged
merged 6 commits into from
Mar 8, 2023

Conversation

zoecarver
Copy link
Contributor

…enable-experimental-cxx-interop`.

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves #NNNNN, fix apple/llvm-project#MMMMM.

@zoecarver
Copy link
Contributor Author

zoecarver commented Mar 3, 2023

  • Rebase
  • Add tests for new flag and diagnostics
  • Update swift driver
  • Update existing tests
  • Update docs for corresponding swiftpm updates

static CxxCompatMode validateCxxInteropCompatibilityMode(StringRef mode) {
if (mode == "off")
return CxxCompatMode::off;
if (mode == "swift-5.7")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (mode == "swift-5.7")
if (mode == "swift-5.9")

And similar

@zoecarver zoecarver marked this pull request as ready for review March 7, 2023 18:23
@zoecarver zoecarver force-pushed the cxx-compatibility-mode branch from 804be33 to f2a36ee Compare March 7, 2023 18:23
@zoecarver
Copy link
Contributor Author

@swift-ci please smoke test

@zoecarver
Copy link
Contributor Author

Once swiftlang/swift-driver#1306 lands I'll make another patch to update the tests in this repo.

@zoecarver
Copy link
Contributor Author

@swift-ci please smoke test

@zoecarver zoecarver changed the title [cxx-interop] Add -cxx-compatibility-mode driver flag; deprecate `-… [cxx-interop] Add -cxx-interoperability-mode driver flag; deprecate `-… Mar 7, 2023
@@ -32,15 +32,9 @@ module CxxTest {
Add the C++ module to the include path and enable C++ interop:
- Navigate to your project directory
- In `Project` navigate to `Build Settings` -> `Swift Compiler`
- Under `Custom Flags` -> `Other Swift Flags` add `-Xfrontend -enable-experimental-cxx-interop`
- Under `Custom Flags` -> `Other Swift Flags` add `-cxx-compatibility-mode=swift-5.9`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Under `Custom Flags` -> `Other Swift Flags` add `-cxx-compatibility-mode=swift-5.9`
- Under `Custom Flags` -> `Other Swift Flags` add `-cxx-interoperability-mode=swift-5.9`

Looks like this one got lost in the rebase.. oops

@zoecarver zoecarver merged commit 0ff5cd9 into swiftlang:main Mar 8, 2023
zoecarver added a commit that referenced this pull request Mar 9, 2023
Follow up from #64088: compatibility -> interoperability
egorzhdan added a commit to swiftlang/swift-package-manager that referenced this pull request Mar 15, 2023
This adds a build setting to the package manifest that enables Swift/C++ Interoperability for a given Swift target:
```
.interoperabilityMode(.Cxx, version: "swift-5.9")
```

This relies on the new Swift driver flag for versioned C++ interop (see swiftlang/swift#64088).

rdar://106756067
egorzhdan added a commit to swiftlang/swift-package-manager that referenced this pull request Mar 16, 2023
This adds a build setting to the package manifest that enables Swift/C++ Interoperability for a given Swift target:
```
.interoperabilityMode(.Cxx, version: "swift-5.9")
```

This relies on the new Swift driver flag for versioned C++ interop (see swiftlang/swift#64088).

rdar://106756067
egorzhdan added a commit to swiftlang/swift-package-manager that referenced this pull request Mar 16, 2023
This adds a build setting to the package manifest that enables Swift/C++ Interoperability for a given Swift target:
```
.interoperabilityMode(.Cxx, version: "swift-5.9")
```

This relies on the new Swift driver flag for versioned C++ interop (see swiftlang/swift#64088).

rdar://106756067
zoecarver pushed a commit to swiftlang/swift-package-manager that referenced this pull request Mar 16, 2023
This adds a build setting to the package manifest that enables Swift/C++ Interoperability for a given Swift target:
```
.interoperabilityMode(.Cxx, version: "swift-5.9")
```

This relies on the new Swift driver flag for versioned C++ interop (see swiftlang/swift#64088).

rdar://106756067
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