Unify native API availability probes - #134073
Merged
Merged
Conversation
Share deployment-target availability checks across native builds and use consistent pipe2 probes (_GNU_SOURCE feature definitions are needed for Linux support). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: efb15d16-e184-4ac5-9673-69a0e061f9bb
akoeplinger
requested review from
a team,
AaronRobinsonMSFT and
janvorli
as code owners
September 16, 2026 15:14
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @dotnet/runtime-infrastructure |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The PAL target must compile with the feature definition used by its pipe2 probe.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Unifies native API availability checks and standardizes pipe2 probes across CMake configurations.
Changes:
- Centralizes Apple deployment-target availability handling.
- Uses scoped
_GNU_SOURCEdefinitions forpipe2detection. - Updates native, libunwind, and PAL configuration probes.
File summaries
| File | Summary |
|---|---|
src/native/libs/configure.cmake |
Updates native library availability probes. |
src/native/external/libunwind_extras/configure.cmake |
Standardizes the libunwind pipe2 probe. |
src/coreclr/pal/src/configure.cmake |
Updates the PAL probe; _GNU_SOURCE is not applied to the PAL target, potentially causing an undeclared pipe2 build failure on glibc. |
eng/native/configurecompiler.cmake |
Adds shared Apple availability-warning configuration. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Lite
This was referenced Sep 16, 2026
Open
jkoritzinsky
approved these changes
Sep 17, 2026
lewing
approved these changes
Sep 17, 2026
This was referenced Sep 18, 2026
jtschuster
pushed a commit
to jtschuster/runtime
that referenced
this pull request
Sep 18, 2026
Share deployment-target availability checks across native builds and use consistent pipe2 probes (_GNU_SOURCE feature definitions are needed for Linux support). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: efb15d16-e184-4ac5-9673-69a0e061f9bb
This was referenced Sep 21, 2026
akoeplinger
added a commit
that referenced
this pull request
Sep 23, 2026
Backport of #134073. # Description These changes are required for compiling with Xcode 27. Move supported `-Werror=unguarded-availability` enforcement into shared native compiler configuration so API probes respect the deployment target regardless of CMake configuration order. Use consistent, header-aware C `pipe2` probes in PAL, libunwind extras, and native libraries, with `_GNU_SOURCE` scoped to each probe using CMake check-state push/pop. # Customer Impact Building with Xcode 27 can incorrectly detect `pipe2` as available for older macOS deployment targets, causing build failures or selecting an API unavailable on the target OS. Shared probe results can otherwise depend on which native component configures first. # Regression Exposed by newer Apple SDK declarations; not established as a regression introduced by this release. # Testing CI testing # Risk Low: limited to native CMake feature detection, with no runtime implementation changes. Availability enforcement is compiler-support gated, and `_GNU_SOURCE` is scoped to the individual checks, preserving existing probe state. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: efb15d16-e184-4ac5-9673-69a0e061f9bb
akoeplinger
added a commit
that referenced
this pull request
Sep 23, 2026
Backport of #134073. # Description These changes are required for compiling with Xcode 27. Move supported `-Werror=unguarded-availability` enforcement into shared native compiler configuration so API probes respect the deployment target regardless of CMake configuration order. Use consistent, header-aware C `pipe2` probes in PAL, libunwind extras, and native libraries, with `_GNU_SOURCE` scoped to each probe using CMake check-state push/pop. # Customer Impact Building with Xcode 27 can incorrectly detect `pipe2` as available for older macOS deployment targets, causing build failures or selecting an API unavailable on the target OS. Shared probe results can otherwise depend on which native component configures first. # Regression Exposed by newer Apple SDK declarations; not established as a regression introduced by this release. # Testing CI testing # Risk Low: limited to native CMake feature detection, with no runtime implementation changes. Availability enforcement is compiler-support gated, and `_GNU_SOURCE` is scoped to the individual checks. Targeted checks verify flag propagation and probe-state preservation on this branch. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: efb15d16-e184-4ac5-9673-69a0e061f9bb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Share deployment-target availability checks across native builds and use consistent pipe2 probes (_GNU_SOURCE feature definitions are needed for Linux support).