Fix pipe2 detection for Apple deployment targets - #134028
Merged
Merged
Conversation
Use a compile probe that calls pipe2 and treats Apple availability diagnostics as errors, while keeping the result independent from shared feature caches. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
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. |
Use a PAL-specific probe variable so browser cache regeneration cannot preseed the host deployment-target check. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
No blocking issues were identified.
Review tier: Lite
Findings: None
What changed in this PR
Fixes CoreCLR PAL pipe2 detection for Apple deployment targets using a call-site compile probe.
Changes:
- Replaces symbol-only detection with deployment-aware compilation.
- Treats unavailable Apple APIs as errors.
- Preserves fallback behavior for unsupported targets.
| File | Summary |
|---|---|
src/coreclr/pal/src/configure.cmake |
Adds deployment-aware pipe2 feature detection. |
jkotas
reviewed
Sep 16, 2026
Publish the deployment-aware result to the CMake cache so sibling directories such as debug-pal cannot observe the stale preloaded value. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep the PAL-specific cache key and Apple availability diagnostic while using the existing CMake helper. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
jkoritzinsky
approved these changes
Sep 16, 2026
lewing
enabled auto-merge (squash)
September 16, 2026 05:57
lewing
disabled auto-merge
September 16, 2026 14:35
akoeplinger
reviewed
Sep 16, 2026
|
|
||
| set(PREVIOUS_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS}) | ||
| if(CLR_CMAKE_HOST_APPLE) | ||
| set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror=unguarded-availability-new") |
Member
There was a problem hiding this comment.
we can do this more globally rather than just for this symbol, opened #134073
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.


Summary
Replace the CoreCLR PAL's symbol-only
pipe2check with a call-site compile probe. On Apple hosts, availability diagnostics are treated as errors so APIs unavailable at the configured deployment target are rejected.Use a distinct probe result to avoid shared or preloaded
HAVE_PIPE2cache entries skipping this PAL-specific check.Validation
./build.sh clr+libs+hostartifacts/obj/coreclr/browser.wasm.Releaseconfiguration using./build.sh clr -os browser -arch wasm -c ReleaseHAVE_PIPE2=0and compilingthreadsusp.cppHAVE_PIPE2=1Resolves #134024
Note
This pull request was generated with the assistance of GitHub Copilot.