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

[release/6.0][mono] Fix iOS/tvOS build with Xcode 14 #76448

Merged

Conversation

akoeplinger
Copy link
Member

Backport of #76433 to release/6.0

Customer Impact

This impacts our official build, without it we can't build iOS/tvOS with Xcode 14 as soon as it rolls out to AzDO.

Testing

Local tests with Xcode 14 confirmed it fixes the issue.

Risk

Low.

IMPORTANT: Is this backport for a servicing release? If so and this change touches code that ships in a NuGet package, please make certain that you have added any necessary package authoring and gotten it explicitly reviewed.

Before Xcode 14 the `objc_super` struct definition in the SDK headers looked like this:

```
#if !defined(__cplusplus)  &&  !__OBJC2__
    /* For compatibility with old objc-runtime.h header */
    __unsafe_unretained _Nonnull Class class;
#else
    __unsafe_unretained _Nonnull Class super_class;
#endif
```

With Xcode 14 however the iOS/tvOS SDK header was changed to only define `super_class`, but the MacOSX SDK stayed the same.

Added CMake detection of this case so we can compile both on older and newer Xcode SDKs across platforms.

(cherry picked from commit d6f4ee1)

# Conflicts:
#	src/mono/cmake/config.h.in
@ghost ghost assigned akoeplinger Sep 30, 2022
@akoeplinger akoeplinger added Servicing-consider Issue for next servicing release review and removed area-Build-mono labels Sep 30, 2022
@akoeplinger akoeplinger added this to the 6.0.x milestone Sep 30, 2022
@akoeplinger akoeplinger changed the title [release/6.0][mono] Fix iOS/tvOS build with Xcode 14 (#76433) [release/6.0][mono] Fix iOS/tvOS build with Xcode 14 Sep 30, 2022
@steveisok steveisok self-requested a review September 30, 2022 14:25
@steveisok
Copy link
Member

@carlossanlop since this is a build change, I think it can go right in after CI completes. Can you merge it for us?

@rbhanda rbhanda added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Oct 4, 2022
@carlossanlop
Copy link
Member

Approved, signed off, CI green. No OOB package authoring changes needed. Ready to merge. :shipit:

@carlossanlop carlossanlop merged commit 03ad4f7 into dotnet:release/6.0 Oct 5, 2022
@akoeplinger akoeplinger deleted the backport-xcode14-fix-to-6.0 branch October 6, 2022 09:34
@ghost ghost locked as resolved and limited conversation to collaborators Nov 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-VM-meta-mono Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants