Skip to content

[release/11.0.1xx] [linker] Restrict globalization symbol alias to MonoVM. Fixes #26876 - #27029

Merged
rolfbjarne merged 2 commits into
release/11.0.1xxfrom
dev/rolf/backport-pr-26903-release/11.0.1xx-2026-10-26
Oct 28, 2026
Merged

rolfbjarne merged 2 commits into
release/11.0.1xxfrom
dev/rolf/backport-pr-26903-release/11.0.1xx-2026-10-26

Conversation

@rolfbjarne

Copy link
Copy Markdown
Member

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.

…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]>
@rolfbjarne
rolfbjarne requested a review from dalexsoto as a code owner October 26, 2026 17:00
@rolfbjarne rolfbjarne added backported ready-to-review This PR is ready to review/merge. labels Oct 26, 2026
Copilot AI balanced review requested due to automatic review settings October 26, 2026 17:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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/null when 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

Comment thread tests/dotnet/UnitTests/ProjectTest.cs Resolved
dalexsoto
dalexsoto previously approved these changes Oct 26, 2026
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

⚠️ AppSizeTest expected files changed ⚠️

The AppSizeTest detected changes in the expected app size files.

To update the expected files, add a comment with the following command:

/apply-gist https://gist.github.com/vs-mobiletools-engineering-service2/6bf25efd9872dcb6dc5a48c979890ca8
Updated files
  • iOS-NativeAOT-size.txt
  • iOS-NativeAOT-TrimmableStatic-size.txt

Pipeline on Agent
Hash: dc02ea60293cb12d618add322b902447d02b4373 [PR build]

@rolfbjarne

Copy link
Copy Markdown
Member Author

@github-actions

Copy link
Copy Markdown
Contributor

✅ Applied expected app size files from gist.

Copilot AI balanced review requested due to automatic review settings October 27, 2026 22:25
@rolfbjarne
rolfbjarne enabled auto-merge (squash) October 27, 2026 22:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the NativeAOT linking and empty export-list changes.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ API diff for current PR / commit

NET (empty diffs)

✅ API diff vs stable

NET (empty diffs)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: 1bc4a73de477808bf8066c35d84ce24a7c27844a [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🚀 [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
✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 5 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 7 tests passed. Html Report (VSDrops) Download
✅ linker (iOS): All 31 tests passed. Html Report (VSDrops) Download
✅ linker (MacCatalyst): All 31 tests passed. Html Report (VSDrops) Download
✅ linker (macOS): All 21 tests passed. Html Report (VSDrops) Download
✅ linker (tvOS): All 31 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 25 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 25 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 20 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 25 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ sharpie: All 1 tests passed. Html Report (VSDrops) Download
✅ windows: All 3 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

macOS tests

✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sequoia (15): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Tahoe (26): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Golden Gate (27): All 5 tests passed. Html Report (VSDrops) Download

Linux Build Verification

✅ Linux build succeeded

Pipeline on Agent
Hash: 1bc4a73de477808bf8066c35d84ce24a7c27844a [PR build]

@rolfbjarne
rolfbjarne merged commit 3909f97 into release/11.0.1xx Oct 28, 2026
56 checks passed
@rolfbjarne
rolfbjarne deleted the dev/rolf/backport-pr-26903-release/11.0.1xx-2026-10-26 branch October 28, 2026 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backported ready-to-review This PR is ready to review/merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants