[release/6.0-preview3] Backport of Add support for using emscripten from packages #50077#50227
Merged
Merged
Conversation
* [wasm] Add support for using emscripten from packages When using a workload that has the emscripten packages, certain properties get set. If that isn't set then we fallback to using `$(EMSDK_PATH)`. This should allow being able to use emscripten from workloads, but for other cases where we depend on an installed emscripten, that should work too. * Fix setting PATH on windows * Using msbuild NormalizeDirectory to construct dir path * fix setting PATH on windows, when paths have trailing slash * [wasm] Improve checking emscripten from workload, and EMSDK_PATH - If a workload pack is being used, then ignore `EMSDK_PATH` - And error in that order too - Emit better error messages Example messages: - Missing python dir when relinking: `warning : Specified Emscripten sdk at $(EMSDK_PATH)=. is missing some paths: $(EmscriptenPythonToolsPath)=/Users/radical/dev/r3/artifacts/bin/Wasm.Build.Tests/net6.0-Release/browser-wasm/e10djxv0.wdr/python/3.7.4-2_64bit/ . Emscripten SDK is required for building native files.` - Missing node directory, or the wrong version dir: `warning : Specified Emscripten sdk at $(EMSDK_PATH)=/Users/radical/dev/r3/src/mono/wasm/emsdk is missing some paths: $(EmscriptenNodeToolsPath)=/Users/radical/dev/r3/src/mono/wasm/emsdk/node/12.18.1_64bit/ . Emscripten SDK is required for building native files.` - Empty `EMSDK_PATH` `Error : Could not find Emscripten sdk at $(EMSDK_PATH)=/Users/radical/dev/r3/src/mono/wasm/emsdk/. Emscripten SDK is required for AOT'ing assemblies.` - Bad `EMSDK_PATH` `error : Specified Emscripten sdk at $(EMSDK_PATH)=. is missing some paths: $(EmscriptenPythonToolsPath)=/Users/radical/dev/r3/artifacts/bin/Wasm.Build.Tests/net6.0-Release/browser-wasm/l2mcsipf.isn/python/3.7.4-2_64bit/ . Emscripten SDK is required for AOT'ing assemblies.` * [wasm] Don't hardcode versions for python/node bundled in emsdk .. and listen to @lewing's suggestions! * [wasm] GetDirectories doesn't like non-existant paths * Fix the earlier fix * improve errors when some paths are missing * cleanup * debugging on ci * [wasm] emscripten uses system python on linux, so don't try to find it in emscripten sdk
Add support for using emscripten from packages #50077
Member
Author
|
@Anipik this is one is needed and the failures are not related to Wasm only builds. |
Anipik
approved these changes
Mar 25, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #50077 to release/6.0-preview3
/cc @radical @pranavkm
Customer Impact
Enables Blazor AOT using packaged versions of the emscripten sdk. Will enable a much smoother experience for Blazor
AOT.
Testing
Tested in main.
Risk
Low. Changes AOT build scenarios that are new in this preview