Repository navigation
Commit 1c1e323
Fix CoreLib trimming substitutions for interpreter-only CoreCLR (dotnet#133639)
## Summary
Fixes dotnet#133615.
Only include CoreCLR's JIT-specific `IsDynamicCodeCompiled` trimming
substitution when `FeatureDynamicCodeCompiled` is enabled. This matches
the condition used by the original getter: interpreter-only CoreCLR can
support dynamic code without compiling it. Normal JIT-enabled
substitution behavior is unchanged.
Reenable `RuntimeFeatureTests.DynamicCode` and `DynamicCode_Jit` on
Apple-mobile CoreCLR by removing their dotnet#124344 exclusions. Narrow the
existing dotnet#123011 interpreter exclusion to non-Apple platforms so the
corrected result does not simply cause `DynamicCode_Jit` to be skipped.
Retain `SkipOnMono`, the non-Apple interpreter exclusion, and all
existing assertions.
This is a standalone trimming fix. It does not depend on dotnet#133378 or
include WASM library-test, CI, or stack-walk workaround changes.
## Validation
Built clean baselines and rebuilt the modified CoreLib for macOS arm64
and iOS simulator arm64 using **Checked CoreCLR / Release libraries**.
All builds completed without warnings or errors.
On an **iOS 26.5 simulator**, ran the same `RuntimeFeatureTests` class
selection with `PublishReadyToRun=false`. Test-selection changes were
applied before the pre-fix run and remained identical afterward.
| Configuration | Executed | Passed | Failed |
|---|---:|---:|---:|
| Pre-fix, aggressively trimmed iOS | 11 | 9 | 2 |
| Pre-fix, untrimmed iOS control | 11 | 11 | 0 |
| Post-fix, aggressively trimmed iOS | 11 | 11 | 0 |
| Post-fix, normal macOS JIT | 13 | 13 | 0 |
The two pre-fix failures were exactly `DynamicCode_Jit`
(`IsDynamicCodeCompiled` unexpectedly true) and `DynamicCode` (direct
getter disagrees with `IsSupported`). Both explicitly pass after the
fix. Each iOS run has one unavailable RemoteExecutor context-switch case
skipped; filtered cases are not counted as executed. Results were read
from application logs, rather than relying on the local `xharness apple
run` exit status.
Additional controls:
- Two fully trimmed desktop CoreLib/probe executions pass: dynamic-code
support enabled preserves compiled=true; disabled preserves
compiled=false.
- ILLink direct-caller inspection confirms iOS compiled=false for either
feature-switch value after the fix, while desktop true/false folding
remains unchanged.
No device, tvOS, MacCatalyst, or release-branch execution is claimed.
## Compatibility and servicing
This corrects a public return value for affected trimmed
interpreter-only CoreCLR applications; compatibility documentation
should follow once the PR is merged.
`release/11.0` and `release/11.0-rc1` have the same getter/substitution
mismatch and are candidates for a targeted .NET 11 backport after main
lands. `release/10.0` lacks the same no-JIT getter implementation, so
this should not be mechanically backported there.
> [!NOTE]
> This pull request description and code changes were generated with
GitHub Copilot.
---------
Co-authored-by: Copilot App <[email protected]>1 parent 3898c71 commit 1c1e323
3 files changed
Lines changed: 3 additions & 5 deletions
File tree
- src
- coreclr/System.Private.CoreLib
- src/ILLink
- libraries/System.Runtime/tests/System.Runtime.Tests/System/Runtime/CompilerServices
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
36 | | - | |
37 | | - | |
38 | | - | |
| 35 | + | |
| 36 | + | |
39 | 37 | | |
40 | 38 | | |
41 | 39 | | |
| |||
0 commit comments