You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[release/10.0.1xx] [linker] Restrict globalization symbol alias to MonoVM. Fixes #26876 - #27103
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.
…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]>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The new tests fail before building because the TrimmerMetadata fixture is missing, and they lack NativeAOT invariant-globalization coverage for the undefined-symbol failure the guard addresses.
This backport addresses #26876 by restricting the globalization symbol alias to MonoVM, avoiding unwanted native symbol references in NativeAOT builds with invariant globalization.
Changes:
Limit globalization symbol preservation to MonoVM.
Use /dev/null for empty native export lists and add export-list selection tests.
Document runtime-specific symbol handling and remote-build behavior.
…balization test
Add the tests/dotnet/TrimmerMetadata test fixture (including the TestReferenceNativeSymbol ReferenceNativeSymbol item) required by DotNetProjectTest.ExportedSymbolsFile, and include RuntimeConfigurationTest.NativeAotInvariantGlobalization from PR #26903.
Co-authored-by: Copilot App <[email protected]>
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Both new test cases fail on CI because BinLog.TryFindPropertyValue cannot read the target-assigned _ExportedSymbolsFile value without property tracking, even when the build succeeds.
Use DotNet.GetProperty to verify _ExportedSymbolsFile
tests/dotnet/UnitTests/ProjectTest.cs:3001
❌ Testing — _ExportedSymbolsFile is assigned inside a target, but BinLog.TryFindPropertyValue does not handle its Set Property: messages. Without property tracking, as on CI, both new cases fail this assertion even when the build succeeds. Use DotNet.GetProperty with target: "Build" to build the project and query the final property value directly.
On release/10.0.1xx (.NET 10), CoreCLR (UseMonoRuntime=false) is not available for ios-arm64 (failing with NETSDK1082). Build TrimmerMetadata for iossimulator-arm64 with Registrar=dynamic and PrepareAssemblies=true so the unused platform assembly is trimmed away and the export list is empty unless TestReferenceNativeSymbol is set, and link Foundation explicitly for the generated main's NSAutoreleasePool usage.
Co-authored-by: Copilot App <[email protected]>
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
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.
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.