Compare commits
2 commits
0474c59df8
...
c4221bff7f
| Author | SHA1 | Date | |
|---|---|---|---|
| c4221bff7f | |||
| 7dfaa5ce0a |
1 changed files with 9 additions and 6 deletions
15
do.ps1
15
do.ps1
|
|
@ -59,19 +59,19 @@ $WASM_FLAGS = "-c -fno-sanitize=address -fno-sanitize=undefined -isystem " +
|
|||
|
||||
# try vendoring zig
|
||||
if (-not (Test-Path $ZIG)) {
|
||||
$zig_ext = "";
|
||||
$ext = "";
|
||||
if ($IsWindows) {
|
||||
$zig_ext = ".zip";
|
||||
$ext = ".zip";
|
||||
} else {
|
||||
$zig_ext = ".tar.xz";
|
||||
$ext = ".tar.xz";
|
||||
}
|
||||
|
||||
$zig_url = "https://ziglang.org/download/$ZIG_VERSION/$ZIG_SLUG$ZIG_EXT";
|
||||
$zig_url = "https://ziglang.org/download/$ZIG_VERSION/$ZIG_SLUG$ext";
|
||||
Write-Host ":: Downloading Zig $ZIG_VERSION ($HOST_OS/$HOST_ARCH)";
|
||||
Write-Host $zig_url;
|
||||
|
||||
if ($IsWindows) {
|
||||
$tmp = Join-Path $DEPS_DIR "zig-compiler$zig_ext";
|
||||
$tmp = Join-Path $DEPS_DIR "zig-compiler$ext";
|
||||
Invoke-WebRequest -Uri $zig_url -OutFile $tmp -UseBasicParsing
|
||||
Expand-Archive -Path $tmp -DestinationPath $DEPS_DIR -Force
|
||||
Remove-Item $tmp
|
||||
|
|
@ -82,9 +82,10 @@ if (-not (Test-Path $ZIG)) {
|
|||
|
||||
# try vendoring emsdk
|
||||
if (-not (Test-Path $EMSDK_DIR)) {
|
||||
Write-Host ":: Cloning emsdk";
|
||||
git clone $EMSDK_REPO $EMSDK_DIR
|
||||
|
||||
Set-Location $EMSDK_DIR
|
||||
Push-Location $EMSDK_DIR
|
||||
|
||||
if ($IsWindows) {
|
||||
&"./emsdk.bat" install latest
|
||||
|
|
@ -93,6 +94,8 @@ if (-not (Test-Path $EMSDK_DIR)) {
|
|||
&"./emsdk" install latest
|
||||
&"./emsdk" activate latest
|
||||
}
|
||||
|
||||
Pop-Location
|
||||
}
|
||||
|
||||
# ensure the out directory exists
|
||||
|
|
|
|||
Loading…
Reference in a new issue