Repository navigation
[release/11.0.1xx] [linker] Restrict globalization symbol alias to MonoVM. Fixes #26876 - #27029
Conversation
…26903) ListExportedSymbols treats System.Globalization.Native as an alias for symbols provided by libmonosgen-2.0. Applying that exception to NativeAOT forces references to globalization functions even when invariant globalization omits their native library, causing undefined-symbol errors during native linking. Limit the alias to MonoVM so NativeAOT relies on the direct references emitted by its compiler. Add invariant-globalization regression cases for all four Apple platforms with assembly preparation enabled and disabled, and document the runtime-specific symbol handling. Fixes #26876 🤖 Pull request created by Copilot --------- Co-authored-by: Copilot App <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
The new binlog assertions need property tracking enabled in both build calls to retrieve target-time property values reliably.
1 open issue
What changed in this PR
Backports #26903 to fix NativeAOT linking failures with invariant globalization (#26876) and handle empty export lists in Windows-to-Mac builds.
Changes:
- Restricts the globalization symbol alias to MonoVM.
- Uses
/dev/nullwhen no native symbols need exporting. - Adds regression coverage and documents runtime-specific symbol handling.
| File | Description |
|---|---|
tools/linker/MonoTouch.Tuner/ListExportedSymbols.cs |
Limits the globalization alias to MonoVM. |
tests/dotnet/UnitTests/WindowsTest.cs |
Checks empty export-list handling in remote builds. |
tests/dotnet/UnitTests/RuntimeConfigurationTest.cs |
Tests NativeAOT invariant globalization across four platforms. |
tests/dotnet/UnitTests/ProjectTest.cs |
Tests empty and nonempty export lists. |
tests/dotnet/TrimmerMetadata/iOS/TrimmerMetadata.csproj |
Supports an optional native symbol for testing. |
dotnet/targets/Xamarin.Shared.Sdk.targets |
Selects /dev/null for empty export lists. |
docs/code/native-symbols.md |
Explains runtime aliases and remote export-list handling. |
Review effort: Balanced
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
|
✅ Applied expected app size files from gist. |
This comment has been minimized.
This comment has been minimized.
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
🚀 [CI Build #1bc4a73] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 269 tests passed 🎉 Tests counts✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |

ListExportedSymbols treats System.Globalization.Native as an alias for symbols provided by libmonosgen-2.0. Applying that exception to NativeAOT forces references to globalization functions even when invariant globalization omits their native library, causing undefined-symbol errors during native linking.
Limit the alias to MonoVM so NativeAOT relies on the direct references emitted by its compiler. Add invariant-globalization regression cases for all four Apple platforms with assembly preparation enabled and disabled, and document the runtime-specific symbol handling.
Fixes #26876
🤖 Pull request created by Copilot
Co-authored-by: Copilot App [email protected]
Backport of #26903.