Skip to content

[release/7.0] [mono] Fix iOS/tvOS build with Xcode 14 - #76447

Merged
carlossanlop merged 1 commit into
release/7.0from
backport/pr-76433-to-release/7.0
Sep 30, 2022
Merged

[release/7.0] [mono] Fix iOS/tvOS build with Xcode 14#76447
carlossanlop merged 1 commit into
release/7.0from
backport/pr-76433-to-release/7.0

Conversation

@github-actions

@github-actionsgithub-actionsBot commented Sep 30, 2022

Copy link
Copy Markdown
Contributor

Backport of #76433 to release/7.0

/cc @akoeplinger

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.
@ghostghost added the area-VM-meta-mono label Sep 30, 2022
@akoeplingerakoeplinger added the Servicing-consider Issue for next servicing release review label Sep 30, 2022
@akoeplingerakoeplinger added this to the 7.0.x milestone Sep 30, 2022
@steveisok
steveisok self-requested a review September 30, 2022 14:24
@steveisok

Copy link
Copy Markdown
Member

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

@carlossanlop

Copy link
Copy Markdown
Contributor

Build/infra change. Signed off. CI green. :shipit:

@carlossanlop
carlossanlop merged commit 54bf306 into release/7.0Sep 30, 2022
@carlossanlop
carlossanlop deleted the backport/pr-76433-to-release/7.0 branch September 30, 2022 17:45
@ghostghost locked as resolved and limited conversation to collaborators Oct 30, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-VM-meta-monoServicing-considerIssue for next servicing release review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@steveisok@carlossanlop@akoeplinger