Skip to content

Commit

Permalink
[WASI] SDK provisioning (dotnet#105321)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelsavara committed Jul 23, 2024
1 parent 0be1ac6 commit fccbc77
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/mono/mono.proj
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ JS_ENGINES = [NODE_JS]
[bug](https://github.com/bytecodealliance/wasm-component-ld/issues/22) which
has been fixed in a v0.5.3 of that utility, so we upgrade it here.
-->
<Exec Command="curl -L -o wasm-component-ld-v0.5.4-x86_64-linux.tar.gz https://github.com/bytecodealliance/wasm-component-ld/releases/download/v0.5.4/wasm-component-ld-v0.5.4-x86_64-linux.tar.gz &amp;&amp; mkdir -p $(WASI_SDK_PATH)wasm-component &amp;&amp; tar --strip-components=1 -xzf wasm-component-ld-v0.5.4-x86_64-linux.tar.gz -C $(WASI_SDK_PATH)wasm-component &amp;&amp; cp $(WASI_SDK_PATH)wasm-component/wasm-component-ld $(WASI_SDK_PATH)bin/wasm-component-ld"
<Exec Command="curl -L -o wasm-component-ld-v0.5.5-x86_64-linux.tar.gz https://github.com/bytecodealliance/wasm-component-ld/releases/download/v0.5.5/wasm-component-ld-v0.5.5-x86_64-linux.tar.gz &amp;&amp; mkdir -p $(WASI_SDK_PATH)wasm-component &amp;&amp; tar --strip-components=1 -xzf wasm-component-ld-v0.5.5-x86_64-linux.tar.gz -C $(WASI_SDK_PATH)wasm-component &amp;&amp; cp $(WASI_SDK_PATH)wasm-component/wasm-component-ld $(WASI_SDK_PATH)bin/wasm-component-ld"
Condition="'$(HostOS)' != 'windows'"
WorkingDirectory="$(ArtifactsObjDir)"
IgnoreStandardErrorWarningFormat="true" />
Expand Down
9 changes: 6 additions & 3 deletions src/mono/wasi/provision.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ param(

Set-StrictMode -version 2.0
$ErrorActionPreference='Stop'
$ProgressPreference = 'SilentlyContinue'

New-Item -Path $WasiSdkPath -ItemType "directory"
Invoke-WebRequest -Uri $WasiSdkUrl -OutFile ./wasi-sdk-$WasiSdkVersion.0-mingw.tar.gz
Expand All @@ -23,6 +24,8 @@ Remove-Item ./wasi-sdk-$WasiSdkVersion.0-mingw.tar.gz -fo
# ships with WASI-SDK 22 contains a
# [bug](https://github.com/bytecodealliance/wasm-component-ld/issues/22) which
# has been fixed in a v0.5.3 of that utility, so we upgrade it here.
Invoke-WebRequest -Uri https://github.com/bytecodealliance/wasm-component-ld/releases/download/v0.5.3/wasm-component-ld-v0.5.3-x86_64-windows.zip -OutFile wasm-component-ld-v0.5.3-x86_64-windows.zip
Expand-Archive -LiteralPath wasm-component-ld-v0.5.3-x86_64-windows.zip -DestinationPath .
Copy-Item wasm-component-ld-v0.5.3-x86_64-windows/wasm-component-ld.exe $WasiSdkPath/bin
Invoke-WebRequest -Uri https://github.com/bytecodealliance/wasm-component-ld/releases/download/v0.5.5/wasm-component-ld-v0.5.5-x86_64-windows.zip -OutFile wasm-component-ld-v0.5.5-x86_64-windows.zip
Expand-Archive -LiteralPath wasm-component-ld-v0.5.5-x86_64-windows.zip -DestinationPath .
Copy-Item wasm-component-ld-v0.5.5-x86_64-windows/wasm-component-ld.exe $WasiSdkPath/bin
Remove-Item ./wasm-component-ld-v0.5.5-x86_64-windows.zip -fo
Remove-Item ./wasm-component-ld-v0.5.5-x86_64-windows -Recurse -fo

0 comments on commit fccbc77

Please sign in to comment.