Skip to content

Use the '-define-availability' frontend flag directly in CMake rules #529

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

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

stmontgomery
Copy link
Contributor

This replaces usages of the -enable-experimental-feature AvailabilityMacro=X Swift frontend flag in swift-testing's CMake rules with -define-availability X.

Motivation:

The former flags are used in Package.swift as a workaround because SwiftPM does not allow using unsafe flags in package dependencies. But this workaround is not necessary when building with CMake—we can use the -define-availability flag directly without restriction.

Using this workaround when building via CMake with Library Evolution enabled causes every specified availability macro flag to be printed in the textual .swiftinterface file for the module. This information is not needed by clients of the Testing module, so the primary motivation of this change is to remove those unnecessary flags from that interface file.

Checklist:

  • Code and documentation should follow the style of the Style Guide.
  • If public symbols are renamed or modified, DocC references should be updated.

@stmontgomery stmontgomery added enhancement New feature or request tools integration Integration of swift-testing into tools/IDEs labels Jul 10, 2024
@stmontgomery stmontgomery self-assigned this Jul 10, 2024
@stmontgomery
Copy link
Contributor Author

@swift-ci please test

@stmontgomery stmontgomery merged commit ad95db1 into swiftlang:main Jul 10, 2024
3 checks passed
@stmontgomery stmontgomery deleted the cmake-define-availability branch July 10, 2024 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request tools integration Integration of swift-testing into tools/IDEs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants