-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[wasm] Add support for native relinking after Build, and AOT after publish #57556
Conversation
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to 'arch-wasm': @lewing Issue Details!!WIP!! Based on the incremental build PR
|
/azp run runtime,runtime-staging |
Azure Pipelines successfully started running 2 pipeline(s). |
Tagging subscribers to this area: @directhex Issue Details!!WIP!! Based on the incremental build PR
|
f606f4d
to
6d54813
Compare
[This PR](dotnet/runtime#57556) adds support for relinking the native wasm files during the build (instead of only during publish). This required changes to the targets available, and how they can be used, and thus require changes in the blazor targets to work with that. The new setup is explained in https://github.com/radical/runtime/blob/wasm-build/src/mono/wasm/build/README.md .
1 failing test on wasm/windows is #58812 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
/backport to release/6.0 |
Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1219117683 |
@radical backporting to release/6.0 failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: rebased
Applying: disable non-wasm builds
Applying: Fix helix work item name
Applying: fix test
Applying: get all the assemblies from the publishdir
Applying: AOTCompiler: Expand the paths used with MONO_PATH
Applying: Implement support for skipping assemblies for AOT
Applying: Update blazorwasm targets file with a locally patched copy
Applying: Cleanup
Applying: fix path for copying blazorwasm targets file
Applying: Fix tests on emsdk
Applying: Don't fixup runtime pack paths when not using workloads
Applying: update platform-matrix
error: sha1 information is lacking or useless (eng/pipelines/common/platform-matrix.yml).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0013 update platform-matrix
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128 Please backport manually! |
[This PR](dotnet/runtime#57556) adds support for relinking the native wasm files during the build (instead of only during publish). This required changes to the targets available, and how they can be used, and thus require changes in the blazor targets to work with that. The new setup is explained in https://github.com/radical/runtime/blob/wasm-build/src/mono/wasm/build/README.md .
[This PR](dotnet/runtime#57556) adds support for relinking the native wasm files during the build (instead of only during publish). This required changes to the targets available, and how they can be used, and thus require changes in the blazor targets to work with that. The new setup is explained in https://github.com/radical/runtime/blob/wasm-build/src/mono/wasm/build/README.md .
Merged in #58913 . |
[This PR](dotnet/runtime#57556) adds support for relinking the native wasm files during the build (instead of only during publish). This required changes to the targets available, and how they can be used, and thus require changes in the blazor targets to work with that. The new setup is explained in https://github.com/radical/runtime/blob/wasm-build/src/mono/wasm/build/README.md . Forward ports the changes from release/6.0.1xx
Wasm app build can run in two scenarios:
dotnet build foo.csproj
A dotnet wasm app has some native wasm files (
dotnet.wasm
, anddotnet.js
). How these files are obtained, or generated:Build
Publish
RunAOTCompilation=true
, then the relinking includes AOT'ed assembliesBuild
Implementation:
Target
WasmBuildApp
runs after
Build
by default$(DisableAutoWasmBuildApp)
$(WasmBuildAppAfterThisTarget)
To run a custom target
$(WasmBuildAppDependsOn)
, and prepend your target name to thatAfterTargets="WasmBuildApp"
on that targetAvoid depending on this target, because it is available only when the workload is installed. Use
$(WasmNativeWorkload)
to check if it is installed.Publish
Implementation:
This part runs as a nested build using a
MSBuild
task, which means that the project gets reevaluated. So, if there were any changes made to items/properties in targets before this, then they won't be visible in the nested build.By default
WasmTriggerPublishApp
runs after thePublish
target, and that triggers the nested buildWasmNestedPublishApp
, which causesBuild
, andPublish
targets to be runBuild
to be run again, if you have any targets that get triggered by that, then they will be running twice.$(WasmBuildingForPublish)
WasmTriggerPublishApp
essentially just invokes the nested publishThis runs after
Publish
$(DisableAutoWasmPublishApp)
$(WasmTriggerPublishAppAfterThisTarget)
To influence the wasm build for publish, use
WasmNestedPublishApp
$(WasmNestedPublishAppDependsOn)
AfterTargets="WasmNestedPublishApp"
If you want to dependsOn on this, then use
DependsOnTargets="WasmTriggerPublishApp"
Fixes #56783, and #53612