Repository navigation
[wasm] Add missing properties to PropertiesThatTriggerRelinking for WASM and WASI - #117983
Conversation
… WASI Co-authored-by: ilonatommy <32700855+ilonatommy@users.noreply.github.com>
Co-authored-by: ilonatommy <32700855+ilonatommy@users.noreply.github.com>
|
@copilot, we have to document the changes. Candidates for placing documentation:
|
…ASI builds Co-authored-by: ilonatommy <32700855+ilonatommy@users.noreply.github.com>
Added comprehensive documentation for properties that trigger relinking in both
This covers the newly added properties ( Commit: 8540857 |
There was a problem hiding this comment.
Pull Request Overview
This PR adds missing properties to PropertiesThatTriggerRelinking for WASM and WASI builds to ensure native components are properly rebuilt when configuration changes occur. The changes ensure that when developers modify important build properties like threading, AOT compilation, or trimming settings, the native runtime artifacts are correctly regenerated.
Key changes:
- Added 4 new properties to WASM builds:
EmccInitialHeapSize,WasmEnableThreads,RunAOTCompilation,PublishTrimmed - Added 3 new properties to WASI builds:
WasmEnableThreads,RunAOTCompilation,PublishTrimmed - Enhanced test coverage and added comprehensive documentation for relinking behavior
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/mono/browser/browser.proj | Added 4 properties to PropertiesThatTriggerRelinking JSON for WASM builds |
| src/mono/wasi/wasi.proj | Added 3 properties to PropertiesThatTriggerRelinking JSON for WASI builds |
| src/mono/wasm/Wasm.Build.Tests/WasmNativeDefaultsTests.cs | Added WasmEnableThreads to test coverage with explanatory comments |
| src/mono/browser/README.md | Added comprehensive documentation section explaining relinking properties and behavior |
| src/mono/wasi/README.md | Added comprehensive documentation section explaining relinking properties and behavior for WASI |
|
Tagging subscribers to 'arch-wasm': @lewing |
Co-authored-by: ilonatommy <32700855+ilonatommy@users.noreply.github.com>
…rRelinking Co-authored-by: ilonatommy <32700855+ilonatommy@users.noreply.github.com>
Co-authored-by: ilonatommy <32700855+ilonatommy@users.noreply.github.com>
|
Should we trigger re-link on all things that influence trimmer features ? We already have |
|
This PR addresses the missing properties in
PropertiesThatTriggerRelinkingfor WASM and WASI builds as identified in the issue discussion.Problem
Several important properties that affect the native build output were not marked as triggering relinking, which could lead to inconsistent builds when these properties change. This means developers might change configuration properties but not see their changes take effect because the native components weren't rebuilt.
Solution
Added the following properties to
PropertiesThatTriggerRelinking:WASM-only (browser.proj):
EmccInitialHeapSize- Controls memory layout together withEmccMaximumHeapSize. Heap size configuration applies only for browser scenarios, same asExceptionHandling.Both WASM and WASI:
WasmEnableThreads- Affects memory layout (e.g., usage ofSharedArrayBufferin browser orDISABLE_THREADSswitches in runtime)RunAOTCompilation- Native objects and linked outputs are no longer valid for new values and must be rebuiltPublishTrimmed- The set of assemblies and code passed to the native linker changes significantlyChanges
src/mono/browser/browser.projto include all 4 properties in the generatedwasm-props.jsonsrc/mono/wasi/wasi.projto include the 3 shared properties in the generatedwasm-props.jsonWasmEnableThreadsto the existing test framework inWasmNativeDefaultsTests.csBehavior
When any of these properties differs from the runtime pack default value, the build system will:
_ChangedPropertiesThatTriggerRelinkingcomparison_WasmBuildNativeRequired=trueWasmBuildNative=trueto trigger native relinkingThis ensures developers get proper native rebuilds when changing these important configuration properties that affect memory layout, threading model, AOT compilation, or IL trimming.
Fixes #105135.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.