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

Enable Objective-C ARC support automatically for Apple platforms #25

Open
cmcgee1024 opened this issue Jan 31, 2025 · 1 comment
Open
Labels
good first issue Good for newcomers

Comments

@cmcgee1024
Copy link
Member

There is a build setting called "CLANG_ENABLE_OBJC_ARC" that should be enabled on Apple platforms, but not for any others since that supports doesn't exist in swift toolchains there. When building PIFs the client shouldn't need to be aware of this implementation detail.

Once this is in place then SwiftPM won't need the following code in the PIF Builder:

#if os(macOS)
        // Objective-C support only for macOS
        settings[.CLANG_ENABLE_OBJC_ARC] = "YES"
#endif
@jakepetroules
Copy link
Collaborator

We'll probably want to enable this by checking a target's isPackage flag in Settings construction, since we don't want to opt in Xcode projects as that would break backwards compatibility.

@jakepetroules jakepetroules added the good first issue Good for newcomers label Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants