Upgrade emsdk to 5.0.6#129299
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Mono WASM/Browser toolchain to Emscripten (emsdk) 5.0.6, and refreshes several repo toolset dependency versions (Arcade/Helix/SDK pins) plus related engineering scripts/templates.
Changes:
- Bump Emscripten version from 3.1.56 → 5.0.6 and update the Windows Python package path used for Browser/WASI builds.
- Refresh dependency/version pins in
global.json,eng/Versions.props, andeng/Version.Details.*. - Update engineering infrastructure (NuGet feed setup scripts, ADO templates, OpenBSD rootfs behavior, Helix monitor timeout), and add an opt-in native compiler detection target.
Reviewed changes
Copilot reviewed 8 out of 17 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/mono/mono.proj | Updates Browser/WASI Windows Python path property to match the new Emscripten package ID/version. |
| src/mono/browser/emscripten-version.txt | Updates tracked Emscripten version to 5.0.6. |
| global.json | Updates Arcade/Helix/SharedFramework SDK pins and IL SDK version. |
| eng/Versions.props | Updates EmsdkVersion to 5.0.6. |
| eng/Version.Details.xml | Updates dependency versions/SHAs to the newer dotnet/dotnet toolset flow. |
| eng/Version.Details.props | Updates derived toolset version properties to match Version.Details.xml. |
| eng/native/tryrun.browser.cmake | Updates the version marker for the browser-wasm try_run cache to 5.0.6. |
| eng/common/templates/vmr-build-pr.yml | Switches VMR GitHub endpoint to public. |
| eng/common/templates/job/job.yml | Removes public-only CG skip step (logic moved elsewhere). |
| eng/common/SetupNugetSources.sh | Avoids triggering repo toolset setup as a side effect of feed configuration. |
| eng/common/SetupNugetSources.ps1 | Same as above for PowerShell. |
| eng/common/native/LocateNativeCompiler.targets | Adds an opt-in target to infer linker flags via init-compiler.sh output. |
| eng/common/cross/build-rootfs.sh | Adjusts OpenBSD rootfs package extraction, symlink logic, and cleanup. |
| eng/common/core-templates/steps/enable-internal-sources.yml | Adds non-Windows feed setup path (Bash) alongside Windows (PowerShell). |
| eng/common/core-templates/job/job.yml | Sets public-project variables to skip CG detection / CodeQL auto-injection. |
| eng/common/core-templates/job/helix-job-monitor.yml | Gives Helix monitor tool more buffer time vs. ADO job timeout. |
This comment has been minimized.
This comment has been minimized.
|
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
41540c2 to
ea8bd08
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara |
|
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
🤖 Emscripten changes from 3.1.56 → 5.0.6 🤖 LLVM 18.1.2 -> 23.0 |
When passing a negative C int to LLVMConstInt, the value is implicitly converted to unsigned long long via sign-extension. In LLVM 23, LLVMConstInt now retains those upper bits when SignExtend is FALSE, which broke constant folding of subsequent ZExt instructions (e.g. 'zext i32 -1 to i64' produced i64 -1 instead of i64 4294967295). This manifested as wrong results for decimal arithmetic in mono+LLVM AOT, e.g. the inlined Decimal..ctor(uint) with a constant argument sign-extending to _lo64. Many CoreLib tests (System.Tests.DecimalTests, System.Text.Tests.RuneTests, Vector128.NarrowWithSaturation*) were failing as a result. Mask the value to the destination width before passing to LLVMConstInt. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Log |
| # Node.js doesn't have good support for WASM_BIGINT | ||
| # so it only is added when running in the browser. | ||
| target_link_options(corerun PRIVATE | ||
| -sWASM_BIGINT=0) |
| protected static bool isHFS => driveFormat != null && driveFormat.Equals(HFS, StringComparison.InvariantCultureIgnoreCase); | ||
|
|
||
| protected static bool LowTemporalResolution => PlatformDetection.IsBrowser || isHFS; | ||
| protected static bool LowTemporalResolution => isHFS; | ||
| protected static bool HighTemporalResolution => !LowTemporalResolution; |
| # This script only consumes helper functions from tools.sh to configure NuGet feeds. | ||
| # Skip importing configure-toolset.sh so that repo-specific toolset setup (e.g. acquiring | ||
| # a bootstrap SDK) is not triggered as a side effect of feed configuration. | ||
| disable_configure_toolset_import=1 | ||
|
|
||
| . "$scriptroot/tools.sh" |
Updated comments to clarify that OSX HFS driver format does not support millisecond granularity.
| if [[ "$__hasWget" == 1 ]]; then | ||
| wget -O- "$PKG_MIRROR/$PKG_FILE" | tar -C "$__RootfsDir" -xzpf - | ||
| wget -O- "$PKG_MIRROR/$PKG_FILE" | tar -C "$__RootfsDir/usr/local" -xzpf - | ||
| else | ||
| curl -SL "$PKG_MIRROR/$PKG_FILE" | tar -C "$__RootfsDir" -xzpf - | ||
| curl -SL "$PKG_MIRROR/$PKG_FILE" | tar -C "$__RootfsDir/usr/local" -xzpf - | ||
| fi |
| # Node.js doesn't have good support for WASM_BIGINT | ||
| # so it only is added when running in the browser. | ||
| target_link_options(corerun PRIVATE | ||
| -sWASM_BIGINT=0) |
| // Mono's LLVM backend uses the global-context LLVM-C type accessors (LLVMInt32Type, etc.) | ||
| // pervasively. These are deprecated in newer LLVM versions in favor of the *InContext variants. | ||
| // Suppress the deprecation warnings rather than threading an LLVMContextRef through every call site. | ||
| #if defined(__clang__) || defined(__GNUC__) | ||
| #pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
| await mono_wasm_after_user_runtime_initialized(); | ||
| endMeasure(mark, MeasuredBlock.onRuntimeInitialized); | ||
| } catch (err) { | ||
| Module.runtimeKeepalivePop(); | ||
| mono_log_error("onRuntimeInitializedAsync() failed", err); | ||
| loaderHelpers.mono_exit(1, err); | ||
| throw err; |
🤖 Copilot Code Review — PR #129299Note This review was generated by GitHub Copilot. Holistic AssessmentMotivation: Upgrading emsdk from 3.1.56 to 5.0.6 (with LLVM 19.x → 23.x) is a justified infrastructure update to keep the WASM toolchain current for .NET 11. The accompanying fixes for LLVM API changes, Wasm exception handling, keepalive management, and the Approach: The approach is sound — version bumps are consistent across all config files, the Mono LLVM C++ code correctly adapts to the deprecated global-context API, the new Wasm EH (exnref) is properly configured with Summary: Detailed Findings✅ LLVM 23 API Adaptation — Correct context threadingThe changes in
All call sites in ✅
|
No description provided.