-
Notifications
You must be signed in to change notification settings - Fork 197
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
Bump the wasi-sdk to 22.0 #967
Conversation
Signed-off-by: James Sturtevant <[email protected]>
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.
Looks like the Windows CI job is still running as I type this. I'll be interested to see if we need to change anything in the NuGet or csproj config to get the latest build of the NativeAOT-LLVM packages or if that will just happen automatically.
Should do, we use |
Oops, I just realized: we should use |
I can address that in a followup. I was going to open up a PR to use clang instead of emscripten for wit-bindgen/crates/csharp/src/csproj.rs Lines 114 to 119 in 2645c4f
|
This is what I did locally for testing, FWIW: <Target Name="CheckWasmSdks">
- <Error Text="Emscripten not found, not compiling to WebAssembly. To enable WebAssembly compilation, install Emscripten and ensure the EMSDK environment variable points to the directory containing upstream/emscripten/emcc.bat"
- Condition="'$(EMSDK)' == ''" />
+ <Error Text="Wasi SDK not found, not compiling to WebAssembly. To enable WebAssembly compilation, install Wasi SDK and ensure the WASI_SDK_PATH environment variable points to the directory containing share/wasi-sysroot"
+ Condition="'$(WASI_SDK_PATH)' == ''" />
+ <Warning Text="The WASI SDK version is too low. Please use WASI SDK 22 or newer with a 64 bit Clang."
+ Condition="!Exists('$(WASI_SDK_PATH)/VERSION')" />
</Target>
"#,
);
@@ -115,7 +117,7 @@ impl CSProjectLLVMBuilder {
Inputs=\"$(MSBuildProjectDirectory)/{camel}_cabi_realloc.c\"
Outputs=\"$(MSBuildProjectDirectory)/{camel}_cabi_realloc.o\"
>
- <Exec Command=\"emcc.bat "$(MSBuildProjectDirectory)/{camel}_cabi_realloc.c" -c -o "$(MSBuildProjectDirectory)/{camel}_cabi_realloc.o"\"/>
+ <Exec Command=\""$(WASI_SDK_PATH)/bin/clang" --target=wasm32-wasi "$(MSBuildProjectDirectory)/{camel}_cabi_realloc.c" -c -o "$(MSBuildProjectDirectory)/{camel}_cabi_realloc.o"\"/>
</Target>
"
)); |
This updates to the latest version and also works towards removing EMSDK for the c# generator (dotnet/runtimelab#2592)