Skip to content

Conversation

@vcsjones
Copy link
Member

We had a couple of places that were using __builtin_available to guard against some platform version features. Now that our Apple platform floor is macOS 12 and iOS/tvOS 13, we can remove some of them.

@vcsjones vcsjones requested a review from steveisok as a code owner December 30, 2025 17:43
Copilot AI review requested due to automatic review settings December 30, 2025 17:43
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Dec 30, 2025
@vcsjones vcsjones added the os-ios Apple iOS label Dec 30, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes unnecessary runtime platform version checks (__builtin_available) that are no longer needed now that the minimum supported Apple platform versions have been raised to macOS 12 and iOS/tvOS 13. This simplifies the code by eliminating conditional compilation paths for older platform versions that are no longer supported.

Key changes:

  • Removes fallback code paths for older OS versions
  • Unconditionally uses newer platform APIs that are now guaranteed to be available
  • Simplifies control flow in several native implementation files

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/native/minipal/memorybarrierprocesswide.c Removes macOS 10.14/iOS 12/tvOS 9 check and fallback thread state implementation, now always uses thread_get_register_pointer_values
src/native/libs/System.Security.Cryptography.Native.Apple/pal_sec.c Removes iOS 11.3/tvOS 11.3 check, now always uses SecCopyErrorMessageString instead of fallback formatting
src/native/libs/System.Security.Cryptography.Native.Apple/pal_rsa.c Removes macOS 10.15/iOS 13/tvOS 13 check, now always adds kSecUseDataProtectionKeychain to RSA key attributes
src/native/libs/System.Security.Cryptography.Native.Apple/pal_ecc.c Removes macOS 10.15/iOS 13/tvOS 13 check, now always adds kSecUseDataProtectionKeychain to ECC key attributes
src/mono/mono/utils/mono-mmap.c Removes macOS 11 check, now unconditionally sets MAP_JIT flag on ARM64 (non-Catalyst)
src/mono/mono/utils/mono-codeman.c Removes macOS 11 checks in both mono_codeman_enable_write and mono_codeman_disable_write, now unconditionally manages JIT write protection

@am11 am11 added area-System.Security and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Jan 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants