Skip to content

[browser][coreCLR] Fix ICU shards#127906

Draft
pavelsavara wants to merge 1 commit intodotnet:mainfrom
pavelsavara:wbt_icu
Draft

[browser][coreCLR] Fix ICU shards#127906
pavelsavara wants to merge 1 commit intodotnet:mainfrom
pavelsavara:wbt_icu

Conversation

@pavelsavara
Copy link
Copy Markdown
Member

@pavelsavara pavelsavara commented May 7, 2026

Fixes #127516

Blocked by #127281

@pavelsavara pavelsavara added this to the 11.0.0 milestone May 7, 2026
@pavelsavara pavelsavara self-assigned this May 7, 2026
Copilot AI review requested due to automatic review settings May 7, 2026 11:36
@pavelsavara pavelsavara added arch-wasm WebAssembly architecture area-System.Globalization os-browser Browser variant of arch-wasm labels May 7, 2026
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/area-system-globalization
See info in area-owners.md if you want to be subscribed.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR targets CoreCLR WASM (browser-wasm) globalization behavior so ICU sharding works in CoreCLR-based Blazor WASM scenarios, and broadens CoreCLR WASM test coverage for ICU/invariant globalization while improving native re-link support via runtime-pack includes.

Changes:

  • Default CoreCLR browser-wasm to InvariantGlobalization=false and adjust CoreCLR native re-link inputs to prefer runtime-pack headers/includes.
  • Update runtime-pack/live-build packaging to include additional CoreCLR WASM artifacts (headers, symbols, host assets) needed for app re-link and distribution.
  • Enable ICU-related Wasm.Build.Tests coverage on CoreCLR and filter out unsupported CoreCLR+AOT permutations.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/native/corehost/browserhost/libBrowserHost.footer.js Adjusts explicit dependency handling for JS library linkage.
src/native/corehost/browserhost/CMakeLists.txt Installs additional headers into sharedFramework for app native re-link scenarios.
src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj Updates CoreCLR trait filtering to allow more Wasm.Build.Tests coverage.
src/mono/wasm/Wasm.Build.Tests/InvariantGlobalizationTests.cs Avoids CoreCLR+AOT execution path in invariant globalization tests.
src/mono/wasm/Wasm.Build.Tests/IcuTestsBase.cs Adds CoreCLR-aware AOT option filtering for ICU test matrices.
src/mono/wasm/Wasm.Build.Tests/IcuTests.cs Uses CoreCLR-aware AOT option filtering in ICU test data.
src/mono/wasm/Wasm.Build.Tests/IcuShardingTests.cs Uses CoreCLR-aware AOT option filtering in sharding test data.
src/mono/wasm/Wasm.Build.Tests/IcuShardingTests2.cs Uses CoreCLR-aware AOT option filtering in sharding-from-pack test data.
src/mono/browser/build/BrowserWasmApp.CoreCLR.targets Sets globalization default and refines native re-link include/lib resolution.
src/libraries/sendtohelix-browser.targets Aligns CoreCLR trait filtering with Wasm.Build.Tests changes.
src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.CoreCLR.sfxproj Ensures static libraries are included in packs for mobile/browser/wasi builds (TargetsMobile).
src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props Adds platform manifest entries for additional CoreCLR WASM assets.
eng/testing/scenarios/BuildWasmAppsJobsListCoreCLR.txt Adds ICU/invariant globalization test classes to CoreCLR BuildWasmApps scenario list.
eng/liveBuilds.targets Updates Browser/CoreCLR runtime file collection for live builds (symbols, extern-post JS, headers, .a handling).

Comment on lines 20 to 24
// libBrowserHostFn is too complex for acorn-optimizer.mjs to find the dependencies
// NOTE: wasm_load_icu_data is NOT listed here because it's only available when
// InvariantGlobalization != true. The loadIcuData() JS code is only called when
// ICU data is present, so the symbol doesn't need to be a hard link-time dependency.
let explicitDeps = [
Comment on lines +285 to +287
<_EmccCFlags Include="-I&quot;$([MSBuild]::NormalizePath('$(RepositoryEngineeringDir)', '..', 'src', 'coreclr', 'vm', 'wasm'))&quot;" Condition="!Exists('$(MicrosoftNetCoreAppRuntimePackRidNativeDir)include/callhelpers.hpp') and '$(RepoRoot)' == '' and '$(RepositoryEngineeringDir)' != '' and Exists('$([MSBuild]::NormalizePath($(RepositoryEngineeringDir), .., src, coreclr, vm, wasm, callhelpers.hpp))')" />
<_EmccCFlags Include="-I&quot;$(RepoRoot)src/native&quot;" Condition="!Exists('$(MicrosoftNetCoreAppRuntimePackRidNativeDir)include/minipal/entrypoints.h') and '$(RepoRoot)' != '' and Exists('$(RepoRoot)src/native/minipal/entrypoints.h')" />
<_EmccCFlags Include="-I&quot;$([MSBuild]::NormalizePath('$(RepositoryEngineeringDir)', '..', 'src', 'native'))&quot;" Condition="!Exists('$(MicrosoftNetCoreAppRuntimePackRidNativeDir)include/minipal/entrypoints.h') and '$(RepoRoot)' == '' and '$(RepositoryEngineeringDir)' != '' and Exists('$([MSBuild]::NormalizePath($(RepositoryEngineeringDir), .., src, native, minipal, entrypoints.h))')" />
private async Task TestInvariantGlobalization(Configuration config, bool aot, bool? invariantGlobalization, bool? isNativeBuild = null)
{
if (aot && IsCoreClrRuntime)
return; // CoreCLR WASM doesn't support AOT
Comment on lines +283 to +285
<PlatformManifestFileEntry Include="callhelpers.hpp" IsNative="true" />
<PlatformManifestFileEntry Include="entrypoints.h" IsNative="true" />
<PlatformManifestFileEntry Include="utils.h" IsNative="true" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arch-wasm WebAssembly architecture area-System.Globalization os-browser Browser variant of arch-wasm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[browser][coreCLR] ICU sharding not working under CoreCLR WASM runtime

2 participants