From 480f6a47adbb4293ec827c537052613649da137c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 9 Sep 2026 13:39:10 +0200 Subject: [PATCH 01/11] ci: bring aarch64-windows script in line with x86_64-windows-release --- ...indows.ps1 => aarch64-windows-release.ps1} | 29 +++++++++---------- 1 file changed, 13 insertions(+), 16 deletions(-) rename ci/{aarch64-windows.ps1 => aarch64-windows-release.ps1} (75%) diff --git a/ci/aarch64-windows.ps1 b/ci/aarch64-windows-release.ps1 similarity index 75% rename from ci/aarch64-windows.ps1 rename to ci/aarch64-windows-release.ps1 index 3268dfd1e4eec456d247780beab3ae2542eb6897..9e470a9ffedc4d3c7a279e68e2bd395a8cd80c7b 100644 --- a/ci/aarch64-windows.ps1 +++ b/ci/aarch64-windows-release.ps1 @@ -1,20 +1,9 @@ $TARGET = "aarch64-windows-gnu" -$ZIG_LLVM_CLANG_LLD_NAME = "zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" $MCPU = "baseline" -$ZIG_LLVM_CLANG_LLD_URL = "https://ziglang.org/deps/$ZIG_LLVM_CLANG_LLD_NAME.zip" -$PREFIX_PATH = "$(Get-Location)\..\$ZIG_LLVM_CLANG_LLD_NAME" +$PREFIX_PATH = "$($Env:USERPROFILE)\deps\zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" $ZIG = "$PREFIX_PATH\bin\zig.exe" $ZSF_MAX_RSS = if ($Env:ZSF_MAX_RSS) { $Env:ZSF_MAX_RSS } else { 0 } -if (!(Test-Path "..\$ZIG_LLVM_CLANG_LLD_NAME.zip")) { - Write-Output "Downloading $ZIG_LLVM_CLANG_LLD_URL" - Invoke-WebRequest -Uri "$ZIG_LLVM_CLANG_LLD_URL" -OutFile "..\$ZIG_LLVM_CLANG_LLD_NAME.zip" - - Write-Output "Extracting..." - Add-Type -AssemblyName System.IO.Compression.FileSystem ; - [System.IO.Compression.ZipFile]::ExtractToDirectory("$PWD\..\$ZIG_LLVM_CLANG_LLD_NAME.zip", "$PWD\..") -} - function CheckLastExitCode { if (!$?) { exit 1 @@ -34,14 +23,14 @@ Set-Location -Path 'build-release' # CMake gives a syntax error when file paths with backward slashes are used. # Here, we use forward slashes only to work around this. -& cmake .. ` +cmake .. ` -GNinja ` -DCMAKE_INSTALL_PREFIX="stage3-release" ` -DCMAKE_PREFIX_PATH="$($PREFIX_PATH -Replace "\\", "/")" ` -DCMAKE_BUILD_TYPE=Release ` -DCMAKE_C_COMPILER="$($ZIG -Replace "\\", "/");cc;-target;$TARGET;-mcpu=$MCPU" ` -DCMAKE_CXX_COMPILER="$($ZIG -Replace "\\", "/");c++;-target;$TARGET;-mcpu=$MCPU" ` - -DCMAKE_AR="$ZIG" ` + -DCMAKE_AR="$($ZIG -Replace "\\", "/")" ` -DZIG_AR_WORKAROUND=ON ` -DZIG_TARGET_TRIPLE="$TARGET" ` -DZIG_TARGET_MCPU="$MCPU" ` @@ -56,18 +45,26 @@ CheckLastExitCode $Env:ZIG_LIB_DIR="$(Get-Location)\..\lib" Write-Output "Main test suite..." -& "stage3-release\bin\zig.exe" build test docs ` +stage3-release\bin\zig.exe build test docs ` --maxrss $ZSF_MAX_RSS ` --search-prefix "$PREFIX_PATH" ` -Dstatic-llvm ` -Dskip-non-native ` + -Dskip-test-incremental ` -Denable-symlinks-windows ` --test-timeout 30m CheckLastExitCode +# Ensure that the fuzzer at least compiles. +# https://codeberg.org/ziglang/zig/issues/31893 +# stage3-release\bin\zig.exe build test-std --fuzz=1K -Dno-lib -Dfuzz-only -Doptimize=ReleaseSafe +# CheckLastExitCode +# stage3-release\bin\zig.exe build test-std --fuzz=1K -Dno-lib -Dfuzz-only -Doptimize=Debug +# CheckLastExitCode + # Ensure that stage3 and stage4 are byte-for-byte identical. Write-Output "Build and compare stage4..." -& "stage3-release\bin\zig.exe" build ` +stage3-release\bin\zig.exe build ` --prefix stage4-release ` -Denable-llvm ` -Dno-lib ` -- 2.54.0 From 2782acad0253d8bfe81be0cee33a4f56b7185db2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 9 Sep 2026 13:46:43 +0200 Subject: [PATCH 02/11] ci: add aarch64-windows-debug script --- ci/aarch64-windows-debug.ps1 | 56 ++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 ci/aarch64-windows-debug.ps1 diff --git a/ci/aarch64-windows-debug.ps1 b/ci/aarch64-windows-debug.ps1 new file mode 100644 index 0000000000000000000000000000000000000000..92f415bde1eeaf4d1e3978ecf057caf52f9d9010 --- /dev/null +++ b/ci/aarch64-windows-debug.ps1 @@ -0,0 +1,56 @@ +$TARGET = "aarch64-windows-gnu" +$MCPU = "baseline" +$PREFIX_PATH = "$($Env:USERPROFILE)\deps\zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" +$ZIG = "$PREFIX_PATH\bin\zig.exe" +$ZSF_MAX_RSS = if ($Env:ZSF_MAX_RSS) { $Env:ZSF_MAX_RSS } else { 0 } + +function CheckLastExitCode { + if (!$?) { + exit 1 + } + return 0 +} + +# Override the cache directories because they won't actually help other CI runs +# which will be testing alternate versions of zig, and ultimately would just +# fill up space on the hard drive for no reason. +$Env:ZIG_GLOBAL_CACHE_DIR="$(Get-Location)\zig-global-cache" +$Env:ZIG_LOCAL_CACHE_DIR="$(Get-Location)\zig-local-cache" + +Write-Output "Building from source..." +New-Item -Force -Path 'build-debug' -ItemType Directory +Set-Location -Path 'build-debug' + +# CMake gives a syntax error when file paths with backward slashes are used. +# Here, we use forward slashes only to work around this. +cmake .. ` + -GNinja ` + -DCMAKE_INSTALL_PREFIX="stage3-debug" ` + -DCMAKE_PREFIX_PATH="$($PREFIX_PATH -Replace "\\", "/")" ` + -DCMAKE_BUILD_TYPE=Debug ` + -DCMAKE_C_COMPILER="$($ZIG -Replace "\\", "/");cc;-target;$TARGET;-mcpu=$MCPU" ` + -DCMAKE_CXX_COMPILER="$($ZIG -Replace "\\", "/");c++;-target;$TARGET;-mcpu=$MCPU" ` + -DCMAKE_AR="$($ZIG -Replace "\\", "/")" ` + -DZIG_AR_WORKAROUND=ON ` + -DZIG_TARGET_TRIPLE="$TARGET" ` + -DZIG_TARGET_MCPU="$MCPU" ` + -DZIG_STATIC=ON ` + -DZIG_NO_LIB=ON +CheckLastExitCode + +ninja install +CheckLastExitCode + +# Must be done after zig cc is finished. +$Env:ZIG_LIB_DIR="$(Get-Location)\..\lib" + +Write-Output "Main test suite..." +stage3-debug\bin\zig build test docs ` + --maxrss $ZSF_MAX_RSS ` + --search-prefix "$PREFIX_PATH" ` + -Dstatic-llvm ` + -Dskip-non-native ` + -Dskip-test-incremental ` + -Denable-symlinks-windows ` + --test-timeout 30m +CheckLastExitCode -- 2.54.0 From 2f30d5b9a891e2db1c953c3710aca286206b9e9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 9 Sep 2026 13:26:38 +0200 Subject: [PATCH 03/11] ci: use mkdir -p to create the build directory This is just a bit more convenient when testing the CI scripts locally. --- ci/aarch64-freebsd-debug.sh | 2 +- ci/aarch64-freebsd-release.sh | 2 +- ci/aarch64-linux-debug.sh | 2 +- ci/aarch64-linux-release.sh | 2 +- ci/aarch64-macos-debug.sh | 2 +- ci/aarch64-macos-release.sh | 2 +- ci/aarch64-netbsd-debug.sh | 2 +- ci/aarch64-netbsd-release.sh | 2 +- ci/aarch64-openbsd-debug.sh | 2 +- ci/aarch64-openbsd-release.sh | 2 +- ci/aarch64-windows-release.ps1 | 2 +- ci/loongarch64-linux-debug.sh | 2 +- ci/loongarch64-linux-release.sh | 2 +- ci/powerpc64le-linux-debug.sh | 2 +- ci/powerpc64le-linux-release.sh | 2 +- ci/riscv64-linux-debug.sh | 2 +- ci/riscv64-linux-release.sh | 2 +- ci/s390x-linux-debug.sh | 2 +- ci/s390x-linux-release.sh | 2 +- ci/x86_64-freebsd-debug.sh | 2 +- ci/x86_64-freebsd-release.sh | 2 +- ci/x86_64-linux-debug-llvm.sh | 2 +- ci/x86_64-linux-debug.sh | 2 +- ci/x86_64-linux-release.sh | 4 ++-- ci/x86_64-netbsd-debug.sh | 2 +- ci/x86_64-netbsd-release.sh | 2 +- ci/x86_64-openbsd-debug.sh | 2 +- ci/x86_64-openbsd-release.sh | 2 +- ci/x86_64-windows-debug.ps1 | 2 +- ci/x86_64-windows-release.ps1 | 2 +- 30 files changed, 31 insertions(+), 31 deletions(-) diff --git a/ci/aarch64-freebsd-debug.sh b/ci/aarch64-freebsd-debug.sh index f1e53270618c5954a0554934a4dd90e81e8d5e3f..73bcf5580a3c1541a6ec2238164f33d54b6a3062 100755 --- a/ci/aarch64-freebsd-debug.sh +++ b/ci/aarch64-freebsd-debug.sh @@ -17,7 +17,7 @@ ZIG="$PREFIX/bin/zig" export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" -mkdir build-debug +mkdir -p build-debug cd build-debug export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" diff --git a/ci/aarch64-freebsd-release.sh b/ci/aarch64-freebsd-release.sh index 0f5a949b7a89c0256f4c9d4d8e85607756b88c00..244e0f88ecb0162bc6d33be9d4259835496ea9c1 100755 --- a/ci/aarch64-freebsd-release.sh +++ b/ci/aarch64-freebsd-release.sh @@ -17,7 +17,7 @@ ZIG="$PREFIX/bin/zig" export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" -mkdir build-release +mkdir -p build-release cd build-release export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" diff --git a/ci/aarch64-linux-debug.sh b/ci/aarch64-linux-debug.sh index c2af0a12108f88fb803c7afeff2b537699458690..352184a2c1599bdd8ed657760440f571e8633a83 100755 --- a/ci/aarch64-linux-debug.sh +++ b/ci/aarch64-linux-debug.sh @@ -19,7 +19,7 @@ export PATH="$HOME/local/bin:$PATH" export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" -mkdir build-debug +mkdir -p build-debug cd build-debug export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" diff --git a/ci/aarch64-linux-release.sh b/ci/aarch64-linux-release.sh index 261aa083ecbb26f3823564bc7bce88449258123d..c60d6f1f903767b9fa47b894562047fe10322e2d 100755 --- a/ci/aarch64-linux-release.sh +++ b/ci/aarch64-linux-release.sh @@ -19,7 +19,7 @@ export PATH="$HOME/local/bin:$PATH" export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" -mkdir build-release +mkdir -p build-release cd build-release export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" diff --git a/ci/aarch64-macos-debug.sh b/ci/aarch64-macos-debug.sh index 226b3109eafa9e8de169999b52fcd748ddb7c088..325f8fdddd41c932682a4057e724dbdc79528e5c 100755 --- a/ci/aarch64-macos-debug.sh +++ b/ci/aarch64-macos-debug.sh @@ -26,7 +26,7 @@ cd $ZIGDIR export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" -mkdir build-debug +mkdir -p build-debug cd build-debug cmake .. \ diff --git a/ci/aarch64-macos-release.sh b/ci/aarch64-macos-release.sh index 8bebf1e3bcac0d5c70d9fac7dac8dee6c348363d..31a1593b61ccab3c3ef8ca31e6963d29b35cf449 100755 --- a/ci/aarch64-macos-release.sh +++ b/ci/aarch64-macos-release.sh @@ -26,7 +26,7 @@ cd $ZIGDIR export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" -mkdir build-release +mkdir -p build-release cd build-release cmake .. \ diff --git a/ci/aarch64-netbsd-debug.sh b/ci/aarch64-netbsd-debug.sh index a7d7d3e97920a95ff4006792c1bea005bc648583..56427a59b90a6e96a81a955875e45880505f4f54 100755 --- a/ci/aarch64-netbsd-debug.sh +++ b/ci/aarch64-netbsd-debug.sh @@ -17,7 +17,7 @@ ZIG="$PREFIX/bin/zig" export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" -mkdir build-debug +mkdir -p build-debug cd build-debug export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" diff --git a/ci/aarch64-netbsd-release.sh b/ci/aarch64-netbsd-release.sh index e0a4c9aaa03f87770b013be6aaf92ffddc6d2bbc..e7bb3f31965caf9557cbb3fcc5df67cd38eab3bd 100755 --- a/ci/aarch64-netbsd-release.sh +++ b/ci/aarch64-netbsd-release.sh @@ -17,7 +17,7 @@ ZIG="$PREFIX/bin/zig" export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" -mkdir build-release +mkdir -p build-release cd build-release export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" diff --git a/ci/aarch64-openbsd-debug.sh b/ci/aarch64-openbsd-debug.sh index 6b38cd7d208a7d7119892acd64bfe5285656fa3b..c2d781bcf172e0858545e7e2e5f04776e6482209 100755 --- a/ci/aarch64-openbsd-debug.sh +++ b/ci/aarch64-openbsd-debug.sh @@ -17,7 +17,7 @@ ZIG="$PREFIX/bin/zig" export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" -mkdir build-debug +mkdir -p build-debug cd build-debug export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" diff --git a/ci/aarch64-openbsd-release.sh b/ci/aarch64-openbsd-release.sh index 36b8a529e3faa9aae592d2e8aa68501f62f5e9fb..ec94f38daee29aa26b85f167d2a539f0ff3cdafb 100755 --- a/ci/aarch64-openbsd-release.sh +++ b/ci/aarch64-openbsd-release.sh @@ -17,7 +17,7 @@ ZIG="$PREFIX/bin/zig" export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" -mkdir build-release +mkdir -p build-release cd build-release export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" diff --git a/ci/aarch64-windows-release.ps1 b/ci/aarch64-windows-release.ps1 index 9e470a9ffedc4d3c7a279e68e2bd395a8cd80c7b..051e92f218a5e7d83d7d107ceccbfd33823038d8 100644 --- a/ci/aarch64-windows-release.ps1 +++ b/ci/aarch64-windows-release.ps1 @@ -18,7 +18,7 @@ $Env:ZIG_GLOBAL_CACHE_DIR="$(Get-Location)\zig-global-cache" $Env:ZIG_LOCAL_CACHE_DIR="$(Get-Location)\zig-local-cache" Write-Output "Building from source..." -New-Item -Path 'build-release' -ItemType Directory +New-Item -Force -Path 'build-release' -ItemType Directory Set-Location -Path 'build-release' # CMake gives a syntax error when file paths with backward slashes are used. diff --git a/ci/loongarch64-linux-debug.sh b/ci/loongarch64-linux-debug.sh index b3460be8fe4585bda04f9702c6d666dcf47949c5..db157146ce092fe9ea298bca039e4035089fd77d 100755 --- a/ci/loongarch64-linux-debug.sh +++ b/ci/loongarch64-linux-debug.sh @@ -17,7 +17,7 @@ ZIG="$PREFIX/bin/zig" export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" -mkdir build-debug +mkdir -p build-debug cd build-debug export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" diff --git a/ci/loongarch64-linux-release.sh b/ci/loongarch64-linux-release.sh index 4c1451a09003a53cde93328d34aad08c7de272f0..773058f487021a9ba7efac8bab20f9d12d7ba3ff 100755 --- a/ci/loongarch64-linux-release.sh +++ b/ci/loongarch64-linux-release.sh @@ -17,7 +17,7 @@ ZIG="$PREFIX/bin/zig" export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" -mkdir build-release +mkdir -p build-release cd build-release export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" diff --git a/ci/powerpc64le-linux-debug.sh b/ci/powerpc64le-linux-debug.sh index 442a7a03c3637b95249b4273469348a418b784ce..637d0598032eaa5e1a54249c8077340960112392 100755 --- a/ci/powerpc64le-linux-debug.sh +++ b/ci/powerpc64le-linux-debug.sh @@ -17,7 +17,7 @@ ZIG="$PREFIX/bin/zig" export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" -mkdir build-debug +mkdir -p build-debug cd build-debug export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" diff --git a/ci/powerpc64le-linux-release.sh b/ci/powerpc64le-linux-release.sh index c03c1504febc9e8039a74781c091fc999dd5d9e8..438a2ad7d17a15c10f461f7ff778d6bebef4209b 100755 --- a/ci/powerpc64le-linux-release.sh +++ b/ci/powerpc64le-linux-release.sh @@ -17,7 +17,7 @@ ZIG="$PREFIX/bin/zig" export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" -mkdir build-release +mkdir -p build-release cd build-release export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" diff --git a/ci/riscv64-linux-debug.sh b/ci/riscv64-linux-debug.sh index 1885782df8f202b2dbe096d178ab447ed5783910..ba9d13f5a869e8d10f3ed02fee8c0f91d6b8d719 100755 --- a/ci/riscv64-linux-debug.sh +++ b/ci/riscv64-linux-debug.sh @@ -17,7 +17,7 @@ ZIG="$PREFIX/bin/zig" export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" -mkdir build-debug +mkdir -p build-debug cd build-debug export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" diff --git a/ci/riscv64-linux-release.sh b/ci/riscv64-linux-release.sh index 396cfac90ba6d626c41e40f9842462a2e81456c4..0e8d91a3dbb19974264567ac4d228de500c1ca7f 100755 --- a/ci/riscv64-linux-release.sh +++ b/ci/riscv64-linux-release.sh @@ -17,7 +17,7 @@ ZIG="$PREFIX/bin/zig" export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" -mkdir build-release +mkdir -p build-release cd build-release export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" diff --git a/ci/s390x-linux-debug.sh b/ci/s390x-linux-debug.sh index 3d97f9c1650189ae1f105553257dd692e94f818d..d80c254bd5e3b908ecd0c53af8f556349474854d 100755 --- a/ci/s390x-linux-debug.sh +++ b/ci/s390x-linux-debug.sh @@ -17,7 +17,7 @@ ZIG="$PREFIX/bin/zig" export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" -mkdir build-debug +mkdir -p build-debug cd build-debug export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" diff --git a/ci/s390x-linux-release.sh b/ci/s390x-linux-release.sh index a8c5a9fcb341bb616729c5ab792acff29ca3db02..b25f6e481c4f3d3739f4d6d9a7dad8590827fb38 100755 --- a/ci/s390x-linux-release.sh +++ b/ci/s390x-linux-release.sh @@ -17,7 +17,7 @@ ZIG="$PREFIX/bin/zig" export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" -mkdir build-release +mkdir -p build-release cd build-release export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" diff --git a/ci/x86_64-freebsd-debug.sh b/ci/x86_64-freebsd-debug.sh index 5266970f1c184067753df726fd8921b87fdd76be..68e55d67b589f81eee10eb289dc623cd62a44a3e 100755 --- a/ci/x86_64-freebsd-debug.sh +++ b/ci/x86_64-freebsd-debug.sh @@ -17,7 +17,7 @@ ZIG="$PREFIX/bin/zig" export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" -mkdir build-debug +mkdir -p build-debug cd build-debug export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" diff --git a/ci/x86_64-freebsd-release.sh b/ci/x86_64-freebsd-release.sh index 9425420cc083a13cf9974640d239d2c65bf99b2f..49698e3b613d404f747fe0eb523029e9949dadfd 100755 --- a/ci/x86_64-freebsd-release.sh +++ b/ci/x86_64-freebsd-release.sh @@ -17,7 +17,7 @@ ZIG="$PREFIX/bin/zig" export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" -mkdir build-release +mkdir -p build-release cd build-release export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" diff --git a/ci/x86_64-linux-debug-llvm.sh b/ci/x86_64-linux-debug-llvm.sh index 12beee8d9baebc901a55076e75fe9d1164f8c193..6c0aa530bceba76e3dc181d7c9ec627d06559037 100755 --- a/ci/x86_64-linux-debug-llvm.sh +++ b/ci/x86_64-linux-debug-llvm.sh @@ -19,7 +19,7 @@ export PATH="$HOME/deps/wasmtime-v46.0.1-x86_64-linux:$HOME/deps/qemu-linux-x86_ export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" -mkdir build-debug-llvm +mkdir -p build-debug-llvm cd build-debug-llvm export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" diff --git a/ci/x86_64-linux-debug.sh b/ci/x86_64-linux-debug.sh index 79787d9cad274c9e06fd70e4527718bf70b4a7d6..67198cea42a252db48b3254e7dd6b3d6a1439ab3 100755 --- a/ci/x86_64-linux-debug.sh +++ b/ci/x86_64-linux-debug.sh @@ -19,7 +19,7 @@ export PATH="$HOME/deps/wasmtime-v46.0.1-x86_64-linux:$HOME/deps/qemu-linux-x86_ export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" -mkdir build-debug +mkdir -p build-debug cd build-debug export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" diff --git a/ci/x86_64-linux-release.sh b/ci/x86_64-linux-release.sh index d8ac56e1af086d1ee298e2352cda71e1504443e9..61a9354ad6e9b4a9a6d8e191e75b6c0dbce7b79e 100755 --- a/ci/x86_64-linux-release.sh +++ b/ci/x86_64-linux-release.sh @@ -25,7 +25,7 @@ cc -o bootstrap bootstrap.c ./zig2 build -Dno-lib ./zig-out/bin/zig test test/behavior.zig -mkdir build-release +mkdir -p build-release cd build-release export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" @@ -94,7 +94,7 @@ diff stage3-release/bin/zig stage4-release/bin/zig # Ensure that updating the wasm binary from this commit will result in a viable build. stage3-release/bin/zig build update-zig1 -mkdir ../build-new +mkdir -p ../build-new cd ../build-new export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" diff --git a/ci/x86_64-netbsd-debug.sh b/ci/x86_64-netbsd-debug.sh index ef16be259f9a5c692d63e094f974c81ee4e0e62d..e6494583b2af19d40ef8b7575295db320035f318 100755 --- a/ci/x86_64-netbsd-debug.sh +++ b/ci/x86_64-netbsd-debug.sh @@ -17,7 +17,7 @@ ZIG="$PREFIX/bin/zig" export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" -mkdir build-debug +mkdir -p build-debug cd build-debug export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" diff --git a/ci/x86_64-netbsd-release.sh b/ci/x86_64-netbsd-release.sh index f9fc7d6aea7fa0ed44223544052dd084a06996fd..7ce0d40f6dba11b25c27411211334b891ee73abb 100755 --- a/ci/x86_64-netbsd-release.sh +++ b/ci/x86_64-netbsd-release.sh @@ -17,7 +17,7 @@ ZIG="$PREFIX/bin/zig" export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" -mkdir build-release +mkdir -p build-release cd build-release export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" diff --git a/ci/x86_64-openbsd-debug.sh b/ci/x86_64-openbsd-debug.sh index 3aac9c636bc642dca609d562c6f721ce6cce8665..e46b99b2f2616fe657573b405afcf2bee2991074 100755 --- a/ci/x86_64-openbsd-debug.sh +++ b/ci/x86_64-openbsd-debug.sh @@ -17,7 +17,7 @@ ZIG="$PREFIX/bin/zig" export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" -mkdir build-debug +mkdir -p build-debug cd build-debug export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" diff --git a/ci/x86_64-openbsd-release.sh b/ci/x86_64-openbsd-release.sh index 76dd9a8b9c0a41efe1a89a21a7125f56f6066d44..101e7814020aca93caffda9239f0c3b1f00fc86e 100755 --- a/ci/x86_64-openbsd-release.sh +++ b/ci/x86_64-openbsd-release.sh @@ -17,7 +17,7 @@ ZIG="$PREFIX/bin/zig" export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" -mkdir build-release +mkdir -p build-release cd build-release export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" diff --git a/ci/x86_64-windows-debug.ps1 b/ci/x86_64-windows-debug.ps1 index fa416bf3ff1207dc26c6ebf497608940d8fc52e7..66557cc74157a21f46ea6585fc594871e24ee0c1 100644 --- a/ci/x86_64-windows-debug.ps1 +++ b/ci/x86_64-windows-debug.ps1 @@ -18,7 +18,7 @@ $Env:ZIG_GLOBAL_CACHE_DIR="$(Get-Location)\zig-global-cache" $Env:ZIG_LOCAL_CACHE_DIR="$(Get-Location)\zig-local-cache" Write-Output "Building from source..." -New-Item -Path 'build-debug' -ItemType Directory +New-Item -Force -Path 'build-debug' -ItemType Directory Set-Location -Path 'build-debug' # CMake gives a syntax error when file paths with backward slashes are used. diff --git a/ci/x86_64-windows-release.ps1 b/ci/x86_64-windows-release.ps1 index 8364836291d8d57097f7a76cba93b651c88c1e94..fc9fb979306874854105cd629f69fb8a758995fc 100644 --- a/ci/x86_64-windows-release.ps1 +++ b/ci/x86_64-windows-release.ps1 @@ -18,7 +18,7 @@ $Env:ZIG_GLOBAL_CACHE_DIR="$(Get-Location)\zig-global-cache" $Env:ZIG_LOCAL_CACHE_DIR="$(Get-Location)\zig-local-cache" Write-Output "Building from source..." -New-Item -Path 'build-release' -ItemType Directory +New-Item -Force -Path 'build-release' -ItemType Directory Set-Location -Path 'build-release' # CMake gives a syntax error when file paths with backward slashes are used. -- 2.54.0 From a644be7ee0ae6d34edf009f4f837ef126e888925 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 9 Sep 2026 13:38:31 +0200 Subject: [PATCH 04/11] ci: add $HOME/local/bin to PATH in all scripts Not strictly needed, but: 1. It makes the scripts easier to diff. 2. It makes adding local binaries easier. --- ci/aarch64-freebsd-debug.sh | 2 ++ ci/aarch64-freebsd-release.sh | 2 ++ ci/aarch64-macos-debug.sh | 5 +++-- ci/aarch64-macos-release.sh | 5 +++-- ci/aarch64-netbsd-debug.sh | 2 ++ ci/aarch64-netbsd-release.sh | 2 ++ ci/aarch64-openbsd-debug.sh | 2 ++ ci/aarch64-openbsd-release.sh | 2 ++ ci/aarch64-windows-debug.ps1 | 2 ++ ci/aarch64-windows-release.ps1 | 2 ++ ci/loongarch64-linux-debug.sh | 2 ++ ci/loongarch64-linux-release.sh | 2 ++ ci/powerpc64le-linux-debug.sh | 2 ++ ci/powerpc64le-linux-release.sh | 2 ++ ci/riscv64-linux-debug.sh | 2 ++ ci/riscv64-linux-release.sh | 2 ++ ci/s390x-linux-debug.sh | 2 ++ ci/s390x-linux-release.sh | 2 ++ ci/x86_64-freebsd-debug.sh | 2 ++ ci/x86_64-freebsd-release.sh | 2 ++ ci/x86_64-netbsd-debug.sh | 2 ++ ci/x86_64-netbsd-release.sh | 2 ++ ci/x86_64-openbsd-debug.sh | 2 ++ ci/x86_64-openbsd-release.sh | 2 ++ ci/x86_64-windows-debug.ps1 | 2 ++ ci/x86_64-windows-release.ps1 | 2 ++ 26 files changed, 54 insertions(+), 4 deletions(-) diff --git a/ci/aarch64-freebsd-debug.sh b/ci/aarch64-freebsd-debug.sh index 73bcf5580a3c1541a6ec2238164f33d54b6a3062..71587595e766c031cc3ed50318637402020b24f2 100755 --- a/ci/aarch64-freebsd-debug.sh +++ b/ci/aarch64-freebsd-debug.sh @@ -11,6 +11,8 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" PREFIX="$HOME/deps/$CACHE_BASENAME" ZIG="$PREFIX/bin/zig" +export PATH="$HOME/local/bin:$PATH" + # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason. diff --git a/ci/aarch64-freebsd-release.sh b/ci/aarch64-freebsd-release.sh index 244e0f88ecb0162bc6d33be9d4259835496ea9c1..5305c3d81bead6815a24b44839e7a3348a0e7761 100755 --- a/ci/aarch64-freebsd-release.sh +++ b/ci/aarch64-freebsd-release.sh @@ -11,6 +11,8 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" PREFIX="$HOME/deps/$CACHE_BASENAME" ZIG="$PREFIX/bin/zig" +export PATH="$HOME/local/bin:$PATH" + # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason. diff --git a/ci/aarch64-macos-debug.sh b/ci/aarch64-macos-debug.sh index 325f8fdddd41c932682a4057e724dbdc79528e5c..635dc8955eedc8d981e93552a8716ac41f41e4ce 100755 --- a/ci/aarch64-macos-debug.sh +++ b/ci/aarch64-macos-debug.sh @@ -5,21 +5,22 @@ set -x set -e -ZIGDIR="$PWD" TARGET="aarch64-macos-none" MCPU="baseline" CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" PREFIX="$HOME/$CACHE_BASENAME" ZIG="$PREFIX/bin/zig" +ZIGDIR="$PWD" if [ ! -d "$PREFIX" ]; then cd $HOME curl -L -O "https://ziglang.org/deps/$CACHE_BASENAME.tar.xz" tar xf "$CACHE_BASENAME.tar.xz" fi - cd $ZIGDIR +export PATH="$HOME/local/bin:$PATH" + # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason. diff --git a/ci/aarch64-macos-release.sh b/ci/aarch64-macos-release.sh index 31a1593b61ccab3c3ef8ca31e6963d29b35cf449..b1d7c9cba2f4391d1e5a6e97dcc261fa6b86a813 100755 --- a/ci/aarch64-macos-release.sh +++ b/ci/aarch64-macos-release.sh @@ -5,21 +5,22 @@ set -x set -e -ZIGDIR="$PWD" TARGET="aarch64-macos-none" MCPU="baseline" CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" PREFIX="$HOME/$CACHE_BASENAME" ZIG="$PREFIX/bin/zig" +ZIGDIR="$PWD" if [ ! -d "$PREFIX" ]; then cd $HOME curl -L -O "https://ziglang.org/deps/$CACHE_BASENAME.tar.xz" tar xf "$CACHE_BASENAME.tar.xz" fi - cd $ZIGDIR +export PATH="$HOME/local/bin:$PATH" + # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason. diff --git a/ci/aarch64-netbsd-debug.sh b/ci/aarch64-netbsd-debug.sh index 56427a59b90a6e96a81a955875e45880505f4f54..d275f3b19721ea3f1aa628460a5f427bb846eb33 100755 --- a/ci/aarch64-netbsd-debug.sh +++ b/ci/aarch64-netbsd-debug.sh @@ -11,6 +11,8 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" PREFIX="$HOME/deps/$CACHE_BASENAME" ZIG="$PREFIX/bin/zig" +export PATH="$HOME/local/bin:$PATH" + # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason. diff --git a/ci/aarch64-netbsd-release.sh b/ci/aarch64-netbsd-release.sh index e7bb3f31965caf9557cbb3fcc5df67cd38eab3bd..49d51c00476318a1a2769794f74fcb0f512bf536 100755 --- a/ci/aarch64-netbsd-release.sh +++ b/ci/aarch64-netbsd-release.sh @@ -11,6 +11,8 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" PREFIX="$HOME/deps/$CACHE_BASENAME" ZIG="$PREFIX/bin/zig" +export PATH="$HOME/local/bin:$PATH" + # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason. diff --git a/ci/aarch64-openbsd-debug.sh b/ci/aarch64-openbsd-debug.sh index c2d781bcf172e0858545e7e2e5f04776e6482209..74808aa44a054f1838e0226739db8cdc8781fe93 100755 --- a/ci/aarch64-openbsd-debug.sh +++ b/ci/aarch64-openbsd-debug.sh @@ -11,6 +11,8 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.2030+f955266cf" PREFIX="$HOME/deps/$CACHE_BASENAME" ZIG="$PREFIX/bin/zig" +export PATH="$HOME/local/bin:$PATH" + # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason. diff --git a/ci/aarch64-openbsd-release.sh b/ci/aarch64-openbsd-release.sh index ec94f38daee29aa26b85f167d2a539f0ff3cdafb..00da968e3501080d4295a8bbd0437ad4e250b406 100755 --- a/ci/aarch64-openbsd-release.sh +++ b/ci/aarch64-openbsd-release.sh @@ -11,6 +11,8 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.2030+f955266cf" PREFIX="$HOME/deps/$CACHE_BASENAME" ZIG="$PREFIX/bin/zig" +export PATH="$HOME/local/bin:$PATH" + # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason. diff --git a/ci/aarch64-windows-debug.ps1 b/ci/aarch64-windows-debug.ps1 index 92f415bde1eeaf4d1e3978ecf057caf52f9d9010..b031bed87a8d2ca1d79a641fcfd42cb68bd24434 100644 --- a/ci/aarch64-windows-debug.ps1 +++ b/ci/aarch64-windows-debug.ps1 @@ -4,6 +4,8 @@ $PREFIX_PATH = "$($Env:USERPROFILE)\deps\zig+llvm+lld+clang-$TARGET-0.17.0-dev.2 $ZIG = "$PREFIX_PATH\bin\zig.exe" $ZSF_MAX_RSS = if ($Env:ZSF_MAX_RSS) { $Env:ZSF_MAX_RSS } else { 0 } +$Env:PATH = "$($Env:USERPROFILE)\local\bin;$Env:PATH" + function CheckLastExitCode { if (!$?) { exit 1 diff --git a/ci/aarch64-windows-release.ps1 b/ci/aarch64-windows-release.ps1 index 051e92f218a5e7d83d7d107ceccbfd33823038d8..6db16d463b66a0ab7da1b3f3674a1c93f8cd0ba8 100644 --- a/ci/aarch64-windows-release.ps1 +++ b/ci/aarch64-windows-release.ps1 @@ -4,6 +4,8 @@ $PREFIX_PATH = "$($Env:USERPROFILE)\deps\zig+llvm+lld+clang-$TARGET-0.17.0-dev.2 $ZIG = "$PREFIX_PATH\bin\zig.exe" $ZSF_MAX_RSS = if ($Env:ZSF_MAX_RSS) { $Env:ZSF_MAX_RSS } else { 0 } +$Env:PATH = "$($Env:USERPROFILE)\local\bin;$Env:PATH" + function CheckLastExitCode { if (!$?) { exit 1 diff --git a/ci/loongarch64-linux-debug.sh b/ci/loongarch64-linux-debug.sh index db157146ce092fe9ea298bca039e4035089fd77d..5f2755dc194d566f77cf8646a21070815003673e 100755 --- a/ci/loongarch64-linux-debug.sh +++ b/ci/loongarch64-linux-debug.sh @@ -11,6 +11,8 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" PREFIX="$HOME/deps/$CACHE_BASENAME" ZIG="$PREFIX/bin/zig" +export PATH="$HOME/local/bin:$PATH" + # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason. diff --git a/ci/loongarch64-linux-release.sh b/ci/loongarch64-linux-release.sh index 773058f487021a9ba7efac8bab20f9d12d7ba3ff..62517fd21199245c9384d1f0882d52ff2c9aed9f 100755 --- a/ci/loongarch64-linux-release.sh +++ b/ci/loongarch64-linux-release.sh @@ -11,6 +11,8 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" PREFIX="$HOME/deps/$CACHE_BASENAME" ZIG="$PREFIX/bin/zig" +export PATH="$HOME/local/bin:$PATH" + # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason. diff --git a/ci/powerpc64le-linux-debug.sh b/ci/powerpc64le-linux-debug.sh index 637d0598032eaa5e1a54249c8077340960112392..7956b46a57eaa579867fed61d3f5b3ba869ab071 100755 --- a/ci/powerpc64le-linux-debug.sh +++ b/ci/powerpc64le-linux-debug.sh @@ -11,6 +11,8 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" PREFIX="$HOME/deps/$CACHE_BASENAME" ZIG="$PREFIX/bin/zig" +export PATH="$HOME/local/bin:$PATH" + # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason. diff --git a/ci/powerpc64le-linux-release.sh b/ci/powerpc64le-linux-release.sh index 438a2ad7d17a15c10f461f7ff778d6bebef4209b..406559ac7f4468ac7b20d3ac325398662ce29d4c 100755 --- a/ci/powerpc64le-linux-release.sh +++ b/ci/powerpc64le-linux-release.sh @@ -11,6 +11,8 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" PREFIX="$HOME/deps/$CACHE_BASENAME" ZIG="$PREFIX/bin/zig" +export PATH="$HOME/local/bin:$PATH" + # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason. diff --git a/ci/riscv64-linux-debug.sh b/ci/riscv64-linux-debug.sh index ba9d13f5a869e8d10f3ed02fee8c0f91d6b8d719..ccdaf7158e50af43bb50d5a358f226371b919cb1 100755 --- a/ci/riscv64-linux-debug.sh +++ b/ci/riscv64-linux-debug.sh @@ -11,6 +11,8 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" PREFIX="$HOME/deps/$CACHE_BASENAME" ZIG="$PREFIX/bin/zig" +export PATH="$HOME/local/bin:$PATH" + # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason. diff --git a/ci/riscv64-linux-release.sh b/ci/riscv64-linux-release.sh index 0e8d91a3dbb19974264567ac4d228de500c1ca7f..453764d4de145995a0dc51ba248576b1693646af 100755 --- a/ci/riscv64-linux-release.sh +++ b/ci/riscv64-linux-release.sh @@ -11,6 +11,8 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" PREFIX="$HOME/deps/$CACHE_BASENAME" ZIG="$PREFIX/bin/zig" +export PATH="$HOME/local/bin:$PATH" + # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason. diff --git a/ci/s390x-linux-debug.sh b/ci/s390x-linux-debug.sh index d80c254bd5e3b908ecd0c53af8f556349474854d..1900235f866060354764202c806984e197c0e4a2 100755 --- a/ci/s390x-linux-debug.sh +++ b/ci/s390x-linux-debug.sh @@ -11,6 +11,8 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" PREFIX="$HOME/deps/$CACHE_BASENAME" ZIG="$PREFIX/bin/zig" +export PATH="$HOME/local/bin:$PATH" + # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason. diff --git a/ci/s390x-linux-release.sh b/ci/s390x-linux-release.sh index b25f6e481c4f3d3739f4d6d9a7dad8590827fb38..6955f328c06f581f39bd83ad69b0394370360e63 100755 --- a/ci/s390x-linux-release.sh +++ b/ci/s390x-linux-release.sh @@ -11,6 +11,8 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" PREFIX="$HOME/deps/$CACHE_BASENAME" ZIG="$PREFIX/bin/zig" +export PATH="$HOME/local/bin:$PATH" + # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason. diff --git a/ci/x86_64-freebsd-debug.sh b/ci/x86_64-freebsd-debug.sh index 68e55d67b589f81eee10eb289dc623cd62a44a3e..5ba7279812bd55026625bc34df353fd6046a0e00 100755 --- a/ci/x86_64-freebsd-debug.sh +++ b/ci/x86_64-freebsd-debug.sh @@ -11,6 +11,8 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" PREFIX="$HOME/deps/$CACHE_BASENAME" ZIG="$PREFIX/bin/zig" +export PATH="$HOME/local/bin:$PATH" + # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason. diff --git a/ci/x86_64-freebsd-release.sh b/ci/x86_64-freebsd-release.sh index 49698e3b613d404f747fe0eb523029e9949dadfd..064c72958313f10298b831fe16a5f364c7a78a33 100755 --- a/ci/x86_64-freebsd-release.sh +++ b/ci/x86_64-freebsd-release.sh @@ -11,6 +11,8 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" PREFIX="$HOME/deps/$CACHE_BASENAME" ZIG="$PREFIX/bin/zig" +export PATH="$HOME/local/bin:$PATH" + # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason. diff --git a/ci/x86_64-netbsd-debug.sh b/ci/x86_64-netbsd-debug.sh index e6494583b2af19d40ef8b7575295db320035f318..c463dcf3c2a92939dcbf7d98e8f095a05fbbd6b7 100755 --- a/ci/x86_64-netbsd-debug.sh +++ b/ci/x86_64-netbsd-debug.sh @@ -11,6 +11,8 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" PREFIX="$HOME/deps/$CACHE_BASENAME" ZIG="$PREFIX/bin/zig" +export PATH="$HOME/local/bin:$PATH" + # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason. diff --git a/ci/x86_64-netbsd-release.sh b/ci/x86_64-netbsd-release.sh index 7ce0d40f6dba11b25c27411211334b891ee73abb..b78b6646179ffcab4de402e2f3bd2b64764b5c9f 100755 --- a/ci/x86_64-netbsd-release.sh +++ b/ci/x86_64-netbsd-release.sh @@ -11,6 +11,8 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" PREFIX="$HOME/deps/$CACHE_BASENAME" ZIG="$PREFIX/bin/zig" +export PATH="$HOME/local/bin:$PATH" + # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason. diff --git a/ci/x86_64-openbsd-debug.sh b/ci/x86_64-openbsd-debug.sh index e46b99b2f2616fe657573b405afcf2bee2991074..b51b93e8adf0376ad8dd14364a0ace3d859e4e28 100755 --- a/ci/x86_64-openbsd-debug.sh +++ b/ci/x86_64-openbsd-debug.sh @@ -11,6 +11,8 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" PREFIX="$HOME/deps/$CACHE_BASENAME" ZIG="$PREFIX/bin/zig" +export PATH="$HOME/local/bin:$PATH" + # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason. diff --git a/ci/x86_64-openbsd-release.sh b/ci/x86_64-openbsd-release.sh index 101e7814020aca93caffda9239f0c3b1f00fc86e..58e1d7bfbab0b0488d03f515e7f4823bfc892660 100755 --- a/ci/x86_64-openbsd-release.sh +++ b/ci/x86_64-openbsd-release.sh @@ -11,6 +11,8 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" PREFIX="$HOME/deps/$CACHE_BASENAME" ZIG="$PREFIX/bin/zig" +export PATH="$HOME/local/bin:$PATH" + # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason. diff --git a/ci/x86_64-windows-debug.ps1 b/ci/x86_64-windows-debug.ps1 index 66557cc74157a21f46ea6585fc594871e24ee0c1..ba86acfdbddc0b2daf3bec7ecee1624c29b6ba10 100644 --- a/ci/x86_64-windows-debug.ps1 +++ b/ci/x86_64-windows-debug.ps1 @@ -4,6 +4,8 @@ $PREFIX_PATH = "$($Env:USERPROFILE)\deps\zig+llvm+lld+clang-$TARGET-0.17.0-dev.2 $ZIG = "$PREFIX_PATH\bin\zig.exe" $ZSF_MAX_RSS = if ($Env:ZSF_MAX_RSS) { $Env:ZSF_MAX_RSS } else { 0 } +$Env:PATH = "$($Env:USERPROFILE)\local\bin;$Env:PATH" + function CheckLastExitCode { if (!$?) { exit 1 diff --git a/ci/x86_64-windows-release.ps1 b/ci/x86_64-windows-release.ps1 index fc9fb979306874854105cd629f69fb8a758995fc..3a2ae878699e3c4108471dadf309866fa59fd757 100644 --- a/ci/x86_64-windows-release.ps1 +++ b/ci/x86_64-windows-release.ps1 @@ -4,6 +4,8 @@ $PREFIX_PATH = "$($Env:USERPROFILE)\deps\zig+llvm+lld+clang-$TARGET-0.17.0-dev.2 $ZIG = "$PREFIX_PATH\bin\zig.exe" $ZSF_MAX_RSS = if ($Env:ZSF_MAX_RSS) { $Env:ZSF_MAX_RSS } else { 0 } +$Env:PATH = "$($Env:USERPROFILE)\local\bin;$Env:PATH" + function CheckLastExitCode { if (!$?) { exit 1 -- 2.54.0 From 021e0ab070d2218f1a8f7be497a7e0289d43ad0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 9 Sep 2026 13:55:42 +0200 Subject: [PATCH 05/11] ci: consistently pass -Dcpu=$MCPU along with -Dtarget=$TARGET --- ci/aarch64-freebsd-debug.sh | 1 + ci/aarch64-freebsd-release.sh | 1 + ci/aarch64-linux-debug.sh | 1 + ci/aarch64-linux-release.sh | 1 + ci/aarch64-macos-debug.sh | 1 + ci/aarch64-macos-release.sh | 1 + ci/aarch64-netbsd-debug.sh | 1 + ci/aarch64-netbsd-release.sh | 1 + ci/aarch64-openbsd-debug.sh | 1 + ci/aarch64-openbsd-release.sh | 1 + ci/aarch64-windows-release.ps1 | 1 + ci/loongarch64-linux-debug.sh | 1 + ci/loongarch64-linux-release.sh | 1 + ci/riscv64-linux-debug.sh | 1 + ci/riscv64-linux-release.sh | 1 + ci/x86_64-freebsd-debug.sh | 1 + ci/x86_64-freebsd-release.sh | 1 + ci/x86_64-linux-debug-llvm.sh | 1 + ci/x86_64-linux-debug.sh | 1 + ci/x86_64-linux-release.sh | 1 + ci/x86_64-netbsd-debug.sh | 1 + ci/x86_64-netbsd-release.sh | 1 + ci/x86_64-openbsd-debug.sh | 1 + ci/x86_64-openbsd-release.sh | 1 + ci/x86_64-windows-release.ps1 | 1 + 25 files changed, 25 insertions(+) diff --git a/ci/aarch64-freebsd-debug.sh b/ci/aarch64-freebsd-debug.sh index 71587595e766c031cc3ed50318637402020b24f2..b477fdb8d5c7efc35602b300ac08ef7d13078bc9 100755 --- a/ci/aarch64-freebsd-debug.sh +++ b/ci/aarch64-freebsd-debug.sh @@ -57,6 +57,7 @@ stage3-debug/bin/zig build \ -Denable-llvm \ -Dno-lib \ -Dtarget=$TARGET \ + -Dcpu=$MCPU \ -Duse-zig-libcxx \ -Dversion-string="$(stage3-debug/bin/zig version)" diff --git a/ci/aarch64-freebsd-release.sh b/ci/aarch64-freebsd-release.sh index 5305c3d81bead6815a24b44839e7a3348a0e7761..01836b0297090393f20868b60316a1f6978d1b6a 100755 --- a/ci/aarch64-freebsd-release.sh +++ b/ci/aarch64-freebsd-release.sh @@ -60,6 +60,7 @@ stage3-release/bin/zig build \ -Doptimize=ReleaseFast \ -Dstrip \ -Dtarget=$TARGET \ + -Dcpu=$MCPU \ -Duse-zig-libcxx \ -Dversion-string="$(stage3-release/bin/zig version)" diff --git a/ci/aarch64-linux-debug.sh b/ci/aarch64-linux-debug.sh index 352184a2c1599bdd8ed657760440f571e8633a83..ae4fe411babde0c11ffbb33ca38bda07effc31af 100755 --- a/ci/aarch64-linux-debug.sh +++ b/ci/aarch64-linux-debug.sh @@ -59,6 +59,7 @@ stage3-debug/bin/zig build \ -Denable-llvm \ -Dno-lib \ -Dtarget=$TARGET \ + -Dcpu=$MCPU \ -Duse-zig-libcxx \ -Dversion-string="$(stage3-debug/bin/zig version)" diff --git a/ci/aarch64-linux-release.sh b/ci/aarch64-linux-release.sh index c60d6f1f903767b9fa47b894562047fe10322e2d..41c12c881f648118a5430ab0340f905546c0a0ec 100755 --- a/ci/aarch64-linux-release.sh +++ b/ci/aarch64-linux-release.sh @@ -62,6 +62,7 @@ stage3-release/bin/zig build \ -Doptimize=ReleaseFast \ -Dstrip \ -Dtarget=$TARGET \ + -Dcpu=$MCPU \ -Duse-zig-libcxx \ -Dversion-string="$(stage3-release/bin/zig version)" diff --git a/ci/aarch64-macos-debug.sh b/ci/aarch64-macos-debug.sh index 635dc8955eedc8d981e93552a8716ac41f41e4ce..9ea978f50989ee196865c35aa79d003b9b81d6ed 100755 --- a/ci/aarch64-macos-debug.sh +++ b/ci/aarch64-macos-debug.sh @@ -66,6 +66,7 @@ stage3-debug/bin/zig build \ -Denable-llvm \ -Dno-lib \ -Dtarget=$TARGET \ + -Dcpu=$MCPU \ -Duse-zig-libcxx \ -Dversion-string="$(stage3-debug/bin/zig version)" diff --git a/ci/aarch64-macos-release.sh b/ci/aarch64-macos-release.sh index b1d7c9cba2f4391d1e5a6e97dcc261fa6b86a813..99ebf2ddec8e106e99ff1a75a5683693d59caa4e 100755 --- a/ci/aarch64-macos-release.sh +++ b/ci/aarch64-macos-release.sh @@ -73,6 +73,7 @@ stage3-release/bin/zig build \ -Doptimize=ReleaseFast \ -Dstrip \ -Dtarget=$TARGET \ + -Dcpu=$MCPU \ -Duse-zig-libcxx \ -Dversion-string="$(stage3-release/bin/zig version)" diff --git a/ci/aarch64-netbsd-debug.sh b/ci/aarch64-netbsd-debug.sh index d275f3b19721ea3f1aa628460a5f427bb846eb33..846f439cc5afa686187a3f90fb4d4dcec1feca51 100755 --- a/ci/aarch64-netbsd-debug.sh +++ b/ci/aarch64-netbsd-debug.sh @@ -57,6 +57,7 @@ stage3-debug/bin/zig build \ -Denable-llvm \ -Dno-lib \ -Dtarget=$TARGET \ + -Dcpu=$MCPU \ -Duse-zig-libcxx \ -Dversion-string="$(stage3-debug/bin/zig version)" diff --git a/ci/aarch64-netbsd-release.sh b/ci/aarch64-netbsd-release.sh index 49d51c00476318a1a2769794f74fcb0f512bf536..b9d0d72c9cdd7b976b4bdad681ae6670534083b0 100755 --- a/ci/aarch64-netbsd-release.sh +++ b/ci/aarch64-netbsd-release.sh @@ -60,6 +60,7 @@ stage3-release/bin/zig build \ -Doptimize=ReleaseFast \ -Dstrip \ -Dtarget=$TARGET \ + -Dcpu=$MCPU \ -Duse-zig-libcxx \ -Dversion-string="$(stage3-release/bin/zig version)" diff --git a/ci/aarch64-openbsd-debug.sh b/ci/aarch64-openbsd-debug.sh index 74808aa44a054f1838e0226739db8cdc8781fe93..af1230da9fc7bb2329d171e08d1baff9ddf970fb 100755 --- a/ci/aarch64-openbsd-debug.sh +++ b/ci/aarch64-openbsd-debug.sh @@ -57,6 +57,7 @@ stage3-debug/bin/zig build \ -Denable-llvm \ -Dno-lib \ -Dtarget=$TARGET \ + -Dcpu=$MCPU \ -Duse-zig-libcxx \ -Dversion-string="$(stage3-debug/bin/zig version)" diff --git a/ci/aarch64-openbsd-release.sh b/ci/aarch64-openbsd-release.sh index 00da968e3501080d4295a8bbd0437ad4e250b406..5b1d78ad79bc084492ee2cc9a58b3fb4c3d64cab 100755 --- a/ci/aarch64-openbsd-release.sh +++ b/ci/aarch64-openbsd-release.sh @@ -65,6 +65,7 @@ stage3-release/bin/zig build \ -Doptimize=ReleaseFast \ -Dstrip \ -Dtarget=$TARGET \ + -Dcpu=$MCPU \ -Duse-zig-libcxx \ -Dversion-string="$(stage3-release/bin/zig version)" diff --git a/ci/aarch64-windows-release.ps1 b/ci/aarch64-windows-release.ps1 index 6db16d463b66a0ab7da1b3f3674a1c93f8cd0ba8..210ff4a9c708195706a120770e8da086b0ef6c24 100644 --- a/ci/aarch64-windows-release.ps1 +++ b/ci/aarch64-windows-release.ps1 @@ -73,6 +73,7 @@ stage3-release\bin\zig.exe build ` -Doptimize=ReleaseFast ` -Dstrip ` -Dtarget="$TARGET" ` + -Dcpu="$MCPU" ` -Duse-zig-libcxx ` -Dversion-string="$(stage3-release\bin\zig version)" CheckLastExitCode diff --git a/ci/loongarch64-linux-debug.sh b/ci/loongarch64-linux-debug.sh index 5f2755dc194d566f77cf8646a21070815003673e..facda56ea7f24a123c5317c0f97a9ca385629338 100755 --- a/ci/loongarch64-linux-debug.sh +++ b/ci/loongarch64-linux-debug.sh @@ -59,6 +59,7 @@ stage3-debug/bin/zig build \ -Denable-llvm \ -Dno-lib \ -Dtarget=$TARGET \ + -Dcpu=$MCPU \ -Duse-zig-libcxx \ -Dversion-string="$(stage3-debug/bin/zig version)" diff --git a/ci/loongarch64-linux-release.sh b/ci/loongarch64-linux-release.sh index 62517fd21199245c9384d1f0882d52ff2c9aed9f..61653f6fd242e040f7ec6e3fd26960bf8e16b124 100755 --- a/ci/loongarch64-linux-release.sh +++ b/ci/loongarch64-linux-release.sh @@ -62,6 +62,7 @@ stage3-release/bin/zig build \ -Doptimize=ReleaseFast \ -Dstrip \ -Dtarget=$TARGET \ + -Dcpu=$MCPU \ -Duse-zig-libcxx \ -Dversion-string="$(stage3-release/bin/zig version)" diff --git a/ci/riscv64-linux-debug.sh b/ci/riscv64-linux-debug.sh index ccdaf7158e50af43bb50d5a358f226371b919cb1..66e03b3f730c8a7eeb91f4add3ac72669175d62e 100755 --- a/ci/riscv64-linux-debug.sh +++ b/ci/riscv64-linux-debug.sh @@ -59,6 +59,7 @@ stage3-debug/bin/zig build \ -Denable-llvm \ -Dno-lib \ -Dtarget=$TARGET \ + -Dcpu=$MCPU \ -Duse-zig-libcxx \ -Dversion-string="$(stage3-debug/bin/zig version)" diff --git a/ci/riscv64-linux-release.sh b/ci/riscv64-linux-release.sh index 453764d4de145995a0dc51ba248576b1693646af..994d48f25f12a41f328cb98be1eecb7cdde5f85b 100755 --- a/ci/riscv64-linux-release.sh +++ b/ci/riscv64-linux-release.sh @@ -62,6 +62,7 @@ stage3-release/bin/zig build \ -Doptimize=ReleaseFast \ -Dstrip \ -Dtarget=$TARGET \ + -Dcpu=$MCPU \ -Duse-zig-libcxx \ -Dversion-string="$(stage3-release/bin/zig version)" diff --git a/ci/x86_64-freebsd-debug.sh b/ci/x86_64-freebsd-debug.sh index 5ba7279812bd55026625bc34df353fd6046a0e00..24df6caf49cfe1342855f52277f1e52faa2633b1 100755 --- a/ci/x86_64-freebsd-debug.sh +++ b/ci/x86_64-freebsd-debug.sh @@ -57,6 +57,7 @@ stage3-debug/bin/zig build \ -Denable-llvm \ -Dno-lib \ -Dtarget=$TARGET \ + -Dcpu=$MCPU \ -Duse-zig-libcxx \ -Dversion-string="$(stage3-debug/bin/zig version)" diff --git a/ci/x86_64-freebsd-release.sh b/ci/x86_64-freebsd-release.sh index 064c72958313f10298b831fe16a5f364c7a78a33..eed9cdc982a80a9162aac1a1fa87ef6d4b246264 100755 --- a/ci/x86_64-freebsd-release.sh +++ b/ci/x86_64-freebsd-release.sh @@ -64,6 +64,7 @@ stage3-release/bin/zig build \ -Doptimize=ReleaseFast \ -Dstrip \ -Dtarget=$TARGET \ + -Dcpu=$MCPU \ -Duse-zig-libcxx \ -Dversion-string="$(stage3-release/bin/zig version)" diff --git a/ci/x86_64-linux-debug-llvm.sh b/ci/x86_64-linux-debug-llvm.sh index 6c0aa530bceba76e3dc181d7c9ec627d06559037..69015c03e866d5fb2a62d7e7a140958c6e588f7d 100755 --- a/ci/x86_64-linux-debug-llvm.sh +++ b/ci/x86_64-linux-debug-llvm.sh @@ -75,6 +75,7 @@ stage3-debug/bin/zig build \ -Denable-llvm \ -Dno-lib \ -Dtarget=$TARGET \ + -Dcpu=$MCPU \ -Duse-zig-libcxx \ -Dversion-string="$(stage3-debug/bin/zig version)" diff --git a/ci/x86_64-linux-debug.sh b/ci/x86_64-linux-debug.sh index 67198cea42a252db48b3254e7dd6b3d6a1439ab3..b88f98b59765fe24ba2d773e0a35516508f14280 100755 --- a/ci/x86_64-linux-debug.sh +++ b/ci/x86_64-linux-debug.sh @@ -74,6 +74,7 @@ stage3-debug/bin/zig build \ -Denable-llvm \ -Dno-lib \ -Dtarget=$TARGET \ + -Dcpu=$MCPU \ -Duse-zig-libcxx \ -Dversion-string="$(stage3-debug/bin/zig version)" diff --git a/ci/x86_64-linux-release.sh b/ci/x86_64-linux-release.sh index 61a9354ad6e9b4a9a6d8e191e75b6c0dbce7b79e..249bd7ce17cfbbc8130d3fbc72adf2b9ed59e02c 100755 --- a/ci/x86_64-linux-release.sh +++ b/ci/x86_64-linux-release.sh @@ -84,6 +84,7 @@ stage3-release/bin/zig build \ -Doptimize=ReleaseFast \ -Dstrip \ -Dtarget=$TARGET \ + -Dcpu=$MCPU \ -Duse-zig-libcxx \ -Dversion-string="$(stage3-release/bin/zig version)" diff --git a/ci/x86_64-netbsd-debug.sh b/ci/x86_64-netbsd-debug.sh index c463dcf3c2a92939dcbf7d98e8f095a05fbbd6b7..4eeb9b39427c9247539d6836785f66e548fd42e4 100755 --- a/ci/x86_64-netbsd-debug.sh +++ b/ci/x86_64-netbsd-debug.sh @@ -57,6 +57,7 @@ stage3-debug/bin/zig build \ -Denable-llvm \ -Dno-lib \ -Dtarget=$TARGET \ + -Dcpu=$MCPU \ -Duse-zig-libcxx \ -Dversion-string="$(stage3-debug/bin/zig version)" diff --git a/ci/x86_64-netbsd-release.sh b/ci/x86_64-netbsd-release.sh index b78b6646179ffcab4de402e2f3bd2b64764b5c9f..a283127f6179c13cabcc7c2aebf6f0bddc9d54c6 100755 --- a/ci/x86_64-netbsd-release.sh +++ b/ci/x86_64-netbsd-release.sh @@ -64,6 +64,7 @@ stage3-release/bin/zig build \ -Doptimize=ReleaseFast \ -Dstrip \ -Dtarget=$TARGET \ + -Dcpu=$MCPU \ -Duse-zig-libcxx \ -Dversion-string="$(stage3-release/bin/zig version)" diff --git a/ci/x86_64-openbsd-debug.sh b/ci/x86_64-openbsd-debug.sh index b51b93e8adf0376ad8dd14364a0ace3d859e4e28..4b0dfba7549d64098b9d3bd3a3f5c44b84218ebf 100755 --- a/ci/x86_64-openbsd-debug.sh +++ b/ci/x86_64-openbsd-debug.sh @@ -57,6 +57,7 @@ stage3-debug/bin/zig build \ -Denable-llvm \ -Dno-lib \ -Dtarget=$TARGET \ + -Dcpu=$MCPU \ -Duse-zig-libcxx \ -Dversion-string="$(stage3-debug/bin/zig version)" diff --git a/ci/x86_64-openbsd-release.sh b/ci/x86_64-openbsd-release.sh index 58e1d7bfbab0b0488d03f515e7f4823bfc892660..fc39f5b3473dcfdd808c58cd91a4f3aaf59053fd 100755 --- a/ci/x86_64-openbsd-release.sh +++ b/ci/x86_64-openbsd-release.sh @@ -65,6 +65,7 @@ stage3-release/bin/zig build \ -Doptimize=ReleaseFast \ -Dstrip \ -Dtarget=$TARGET \ + -Dcpu=$MCPU \ -Duse-zig-libcxx \ -Dversion-string="$(stage3-release/bin/zig version)" diff --git a/ci/x86_64-windows-release.ps1 b/ci/x86_64-windows-release.ps1 index 3a2ae878699e3c4108471dadf309866fa59fd757..af0e2c7f072602e5d65e408b38a8e9ec9ee4da91 100644 --- a/ci/x86_64-windows-release.ps1 +++ b/ci/x86_64-windows-release.ps1 @@ -73,6 +73,7 @@ stage3-release\bin\zig.exe build ` -Doptimize=ReleaseFast ` -Dstrip ` -Dtarget="$TARGET" ` + -Dcpu="$MCPU" ` -Duse-zig-libcxx ` -Dversion-string="$(stage3-release\bin\zig version)" CheckLastExitCode -- 2.54.0 From 89fba482797e8803bdd3997a87923e111577eba1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 9 Sep 2026 13:56:13 +0200 Subject: [PATCH 06/11] ci: remove stale CMake workaround in x86_64-linux-release Missed in 3dfcba86b856cfcf2aaef9e4ca636c7b2d2f9276. --- ci/x86_64-linux-release.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ci/x86_64-linux-release.sh b/ci/x86_64-linux-release.sh index 249bd7ce17cfbbc8130d3fbc72adf2b9ed59e02c..d54769e968550bae4b1ed888567b6e077a966230 100755 --- a/ci/x86_64-linux-release.sh +++ b/ci/x86_64-linux-release.sh @@ -109,10 +109,7 @@ cmake .. \ -DZIG_TARGET_MCPU="$MCPU" \ -DZIG_STATIC=ON \ -DZIG_NO_LIB=ON \ - -GNinja \ - -DCMAKE_C_LINKER_DEPFILE_SUPPORTED=FALSE \ - -DCMAKE_CXX_LINKER_DEPFILE_SUPPORTED=FALSE -# https://github.com/ziglang/zig/issues/22213 + -GNinja unset CC unset CXX -- 2.54.0 From b877cf3fe54c93117400aaf9ff72d92133b42c03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 9 Sep 2026 14:00:13 +0200 Subject: [PATCH 07/11] ci: remove unnecessary comments --- ci/aarch64-linux-debug.sh | 1 - ci/aarch64-linux-release.sh | 1 - ci/loongarch64-linux-debug.sh | 1 - ci/loongarch64-linux-release.sh | 1 - ci/powerpc64le-linux-debug.sh | 1 - ci/powerpc64le-linux-release.sh | 1 - ci/riscv64-linux-debug.sh | 1 - ci/riscv64-linux-release.sh | 1 - ci/s390x-linux-debug.sh | 1 - ci/s390x-linux-release.sh | 1 - 10 files changed, 10 deletions(-) diff --git a/ci/aarch64-linux-debug.sh b/ci/aarch64-linux-debug.sh index ae4fe411babde0c11ffbb33ca38bda07effc31af..89fcee5261cf9cf13eb61d39785ac86e51a528a0 100755 --- a/ci/aarch64-linux-debug.sh +++ b/ci/aarch64-linux-debug.sh @@ -45,7 +45,6 @@ ninja install # Must be done after zig cc is finished. export ZIG_LIB_DIR="$PWD/../lib" -# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts. stage3-debug/bin/zig build test docs \ --maxrss ${ZSF_MAX_RSS:-0} \ -Dstatic-llvm \ diff --git a/ci/aarch64-linux-release.sh b/ci/aarch64-linux-release.sh index 41c12c881f648118a5430ab0340f905546c0a0ec..9043e5489eda9ddbe03ccfa3b9f5105717c8a99f 100755 --- a/ci/aarch64-linux-release.sh +++ b/ci/aarch64-linux-release.sh @@ -45,7 +45,6 @@ ninja install # Must be done after zig cc is finished. export ZIG_LIB_DIR="$PWD/../lib" -# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts. stage3-release/bin/zig build test docs \ --maxrss ${ZSF_MAX_RSS:-0} \ -Dstatic-llvm \ diff --git a/ci/loongarch64-linux-debug.sh b/ci/loongarch64-linux-debug.sh index facda56ea7f24a123c5317c0f97a9ca385629338..bcf848d07adb7ecd3e32c7a93d1af46e540aaad3 100755 --- a/ci/loongarch64-linux-debug.sh +++ b/ci/loongarch64-linux-debug.sh @@ -45,7 +45,6 @@ ninja install # Must be done after zig cc is finished. export ZIG_LIB_DIR="$PWD/../lib" -# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts. stage3-debug/bin/zig build test docs \ --maxrss ${ZSF_MAX_RSS:-0} \ -Dstatic-llvm \ diff --git a/ci/loongarch64-linux-release.sh b/ci/loongarch64-linux-release.sh index 61653f6fd242e040f7ec6e3fd26960bf8e16b124..5e1ded5744baab636ec866ba42d53c4e11646f3b 100755 --- a/ci/loongarch64-linux-release.sh +++ b/ci/loongarch64-linux-release.sh @@ -45,7 +45,6 @@ ninja install # Must be done after zig cc is finished. export ZIG_LIB_DIR="$PWD/../lib" -# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts. stage3-release/bin/zig build test docs \ --maxrss ${ZSF_MAX_RSS:-0} \ -Dstatic-llvm \ diff --git a/ci/powerpc64le-linux-debug.sh b/ci/powerpc64le-linux-debug.sh index 7956b46a57eaa579867fed61d3f5b3ba869ab071..b5855792064a5eb15b6a989288b95d5bd4acb053 100755 --- a/ci/powerpc64le-linux-debug.sh +++ b/ci/powerpc64le-linux-debug.sh @@ -45,7 +45,6 @@ ninja install # Must be done after zig cc is finished. export ZIG_LIB_DIR="$PWD/../lib" -# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts. stage3-debug/bin/zig build test docs \ --maxrss ${ZSF_MAX_RSS:-0} \ -Dstatic-llvm \ diff --git a/ci/powerpc64le-linux-release.sh b/ci/powerpc64le-linux-release.sh index 406559ac7f4468ac7b20d3ac325398662ce29d4c..06bdcbabe912cf2bc00b1ecdf20ff55c200c6a53 100755 --- a/ci/powerpc64le-linux-release.sh +++ b/ci/powerpc64le-linux-release.sh @@ -45,7 +45,6 @@ ninja install # Must be done after zig cc is finished. export ZIG_LIB_DIR="$PWD/../lib" -# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts. stage3-release/bin/zig build test docs \ --maxrss ${ZSF_MAX_RSS:-0} \ -Dstatic-llvm \ diff --git a/ci/riscv64-linux-debug.sh b/ci/riscv64-linux-debug.sh index 66e03b3f730c8a7eeb91f4add3ac72669175d62e..a7b6cf2df2b1f52d2ab4aac0f72cc8deade8e5b6 100755 --- a/ci/riscv64-linux-debug.sh +++ b/ci/riscv64-linux-debug.sh @@ -45,7 +45,6 @@ ninja install # Must be done after zig cc is finished. export ZIG_LIB_DIR="$PWD/../lib" -# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts. stage3-debug/bin/zig build test docs \ --maxrss ${ZSF_MAX_RSS:-0} \ -Dstatic-llvm \ diff --git a/ci/riscv64-linux-release.sh b/ci/riscv64-linux-release.sh index 994d48f25f12a41f328cb98be1eecb7cdde5f85b..8044034933008d8c7f6b29c28f311837bc766ca0 100755 --- a/ci/riscv64-linux-release.sh +++ b/ci/riscv64-linux-release.sh @@ -45,7 +45,6 @@ ninja install # Must be done after zig cc is finished. export ZIG_LIB_DIR="$PWD/../lib" -# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts. stage3-release/bin/zig build test docs \ --maxrss ${ZSF_MAX_RSS:-0} \ -Dstatic-llvm \ diff --git a/ci/s390x-linux-debug.sh b/ci/s390x-linux-debug.sh index 1900235f866060354764202c806984e197c0e4a2..9724ae1e3ec39869299f232d99b208a9cfb2bdd2 100755 --- a/ci/s390x-linux-debug.sh +++ b/ci/s390x-linux-debug.sh @@ -45,7 +45,6 @@ ninja install # Must be done after zig cc is finished. export ZIG_LIB_DIR="$PWD/../lib" -# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts. stage3-debug/bin/zig build test docs \ --maxrss ${ZSF_MAX_RSS:-0} \ -Dstatic-llvm \ diff --git a/ci/s390x-linux-release.sh b/ci/s390x-linux-release.sh index 6955f328c06f581f39bd83ad69b0394370360e63..acbae579364afff7c76f2b65ea857fc18c984866 100755 --- a/ci/s390x-linux-release.sh +++ b/ci/s390x-linux-release.sh @@ -45,7 +45,6 @@ ninja install # Must be done after zig cc is finished. export ZIG_LIB_DIR="$PWD/../lib" -# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts. stage3-release/bin/zig build test docs \ --maxrss ${ZSF_MAX_RSS:-0} \ -Dstatic-llvm \ -- 2.54.0 From 47f132b7705f4ded6d671c1f5abe0b9003e57e44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 9 Sep 2026 14:08:15 +0200 Subject: [PATCH 08/11] ci: use CMAKE_{C,CXX}_COMPILER instead of the CC/CXX env dance --- ci/aarch64-freebsd-debug.sh | 10 ++-------- ci/aarch64-freebsd-release.sh | 10 ++-------- ci/aarch64-linux-debug.sh | 10 ++-------- ci/aarch64-linux-release.sh | 10 ++-------- ci/aarch64-netbsd-debug.sh | 10 ++-------- ci/aarch64-netbsd-release.sh | 10 ++-------- ci/aarch64-openbsd-debug.sh | 10 ++-------- ci/aarch64-openbsd-release.sh | 10 ++-------- ci/loongarch64-linux-debug.sh | 10 ++-------- ci/loongarch64-linux-release.sh | 10 ++-------- ci/powerpc64le-linux-debug.sh | 10 ++-------- ci/powerpc64le-linux-release.sh | 10 ++-------- ci/riscv64-linux-debug.sh | 10 ++-------- ci/riscv64-linux-release.sh | 10 ++-------- ci/s390x-linux-debug.sh | 10 ++-------- ci/s390x-linux-release.sh | 10 ++-------- ci/x86_64-freebsd-debug.sh | 10 ++-------- ci/x86_64-freebsd-release.sh | 10 ++-------- ci/x86_64-linux-debug-llvm.sh | 10 ++-------- ci/x86_64-linux-debug.sh | 10 ++-------- ci/x86_64-linux-release.sh | 17 ++++------------- ci/x86_64-netbsd-debug.sh | 10 ++-------- ci/x86_64-netbsd-release.sh | 10 ++-------- ci/x86_64-openbsd-debug.sh | 10 ++-------- ci/x86_64-openbsd-release.sh | 10 ++-------- 25 files changed, 52 insertions(+), 205 deletions(-) diff --git a/ci/aarch64-freebsd-debug.sh b/ci/aarch64-freebsd-debug.sh index b477fdb8d5c7efc35602b300ac08ef7d13078bc9..a11481b4a74d998f03003a02c70576f516274b43 100755 --- a/ci/aarch64-freebsd-debug.sh +++ b/ci/aarch64-freebsd-debug.sh @@ -22,24 +22,18 @@ export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" mkdir -p build-debug cd build-debug -export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" -export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" - cmake .. \ -DCMAKE_INSTALL_PREFIX="stage3-debug" \ -DCMAKE_PREFIX_PATH="$PREFIX" \ -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ + -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ -DZIG_TARGET_TRIPLE="$TARGET" \ -DZIG_TARGET_MCPU="$MCPU" \ -DZIG_STATIC=ON \ -DZIG_NO_LIB=ON \ -GNinja -# Now cmake will use zig as the C/C++ compiler. We reset the environment variables -# so that installation and testing do not get affected by them. -unset CC -unset CXX - ninja install # Must be done after zig cc is finished. diff --git a/ci/aarch64-freebsd-release.sh b/ci/aarch64-freebsd-release.sh index 01836b0297090393f20868b60316a1f6978d1b6a..205900073ec3dee440aaa75a1b5e6edebe2a412c 100755 --- a/ci/aarch64-freebsd-release.sh +++ b/ci/aarch64-freebsd-release.sh @@ -22,24 +22,18 @@ export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" mkdir -p build-release cd build-release -export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" -export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" - cmake .. \ -DCMAKE_INSTALL_PREFIX="stage3-release" \ -DCMAKE_PREFIX_PATH="$PREFIX" \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ + -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ -DZIG_TARGET_TRIPLE="$TARGET" \ -DZIG_TARGET_MCPU="$MCPU" \ -DZIG_STATIC=ON \ -DZIG_NO_LIB=ON \ -GNinja -# Now cmake will use zig as the C/C++ compiler. We reset the environment variables -# so that installation and testing do not get affected by them. -unset CC -unset CXX - ninja install # Must be done after zig cc is finished. diff --git a/ci/aarch64-linux-debug.sh b/ci/aarch64-linux-debug.sh index 89fcee5261cf9cf13eb61d39785ac86e51a528a0..185e4c6ce3a50b6b8c898208fe3e813298cae982 100755 --- a/ci/aarch64-linux-debug.sh +++ b/ci/aarch64-linux-debug.sh @@ -22,24 +22,18 @@ export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" mkdir -p build-debug cd build-debug -export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" -export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" - cmake .. \ -DCMAKE_INSTALL_PREFIX="stage3-debug" \ -DCMAKE_PREFIX_PATH="$PREFIX" \ -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ + -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ -DZIG_TARGET_TRIPLE="$TARGET" \ -DZIG_TARGET_MCPU="$MCPU" \ -DZIG_STATIC=ON \ -DZIG_NO_LIB=ON \ -GNinja -# Now cmake will use zig as the C/C++ compiler. We reset the environment variables -# so that installation and testing do not get affected by them. -unset CC -unset CXX - ninja install # Must be done after zig cc is finished. diff --git a/ci/aarch64-linux-release.sh b/ci/aarch64-linux-release.sh index 9043e5489eda9ddbe03ccfa3b9f5105717c8a99f..40c9b428c0cc4cb612885fcd79238fb6518a61db 100755 --- a/ci/aarch64-linux-release.sh +++ b/ci/aarch64-linux-release.sh @@ -22,24 +22,18 @@ export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" mkdir -p build-release cd build-release -export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" -export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" - cmake .. \ -DCMAKE_INSTALL_PREFIX="stage3-release" \ -DCMAKE_PREFIX_PATH="$PREFIX" \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ + -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ -DZIG_TARGET_TRIPLE="$TARGET" \ -DZIG_TARGET_MCPU="$MCPU" \ -DZIG_STATIC=ON \ -DZIG_NO_LIB=ON \ -GNinja -# Now cmake will use zig as the C/C++ compiler. We reset the environment variables -# so that installation and testing do not get affected by them. -unset CC -unset CXX - ninja install # Must be done after zig cc is finished. diff --git a/ci/aarch64-netbsd-debug.sh b/ci/aarch64-netbsd-debug.sh index 846f439cc5afa686187a3f90fb4d4dcec1feca51..1791da2caa55e49c02faf72169835834fb3b1c89 100755 --- a/ci/aarch64-netbsd-debug.sh +++ b/ci/aarch64-netbsd-debug.sh @@ -22,24 +22,18 @@ export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" mkdir -p build-debug cd build-debug -export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" -export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" - cmake .. \ -DCMAKE_INSTALL_PREFIX="stage3-debug" \ -DCMAKE_PREFIX_PATH="$PREFIX" \ -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ + -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ -DZIG_TARGET_TRIPLE="$TARGET" \ -DZIG_TARGET_MCPU="$MCPU" \ -DZIG_STATIC=ON \ -DZIG_NO_LIB=ON \ -GNinja -# Now cmake will use zig as the C/C++ compiler. We reset the environment variables -# so that installation and testing do not get affected by them. -unset CC -unset CXX - ninja install # Must be done after zig cc is finished. diff --git a/ci/aarch64-netbsd-release.sh b/ci/aarch64-netbsd-release.sh index b9d0d72c9cdd7b976b4bdad681ae6670534083b0..f0dc9d639d5a66c454c3af65ca3d743c774bf8bc 100755 --- a/ci/aarch64-netbsd-release.sh +++ b/ci/aarch64-netbsd-release.sh @@ -22,24 +22,18 @@ export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" mkdir -p build-release cd build-release -export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" -export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" - cmake .. \ -DCMAKE_INSTALL_PREFIX="stage3-release" \ -DCMAKE_PREFIX_PATH="$PREFIX" \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ + -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ -DZIG_TARGET_TRIPLE="$TARGET" \ -DZIG_TARGET_MCPU="$MCPU" \ -DZIG_STATIC=ON \ -DZIG_NO_LIB=ON \ -GNinja -# Now cmake will use zig as the C/C++ compiler. We reset the environment variables -# so that installation and testing do not get affected by them. -unset CC -unset CXX - ninja install # Must be done after zig cc is finished. diff --git a/ci/aarch64-openbsd-debug.sh b/ci/aarch64-openbsd-debug.sh index af1230da9fc7bb2329d171e08d1baff9ddf970fb..ccb691a1f1385cafe025440f6e9b6b60d3e475c9 100755 --- a/ci/aarch64-openbsd-debug.sh +++ b/ci/aarch64-openbsd-debug.sh @@ -22,24 +22,18 @@ export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" mkdir -p build-debug cd build-debug -export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" -export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" - cmake .. \ -DCMAKE_INSTALL_PREFIX="stage3-debug" \ -DCMAKE_PREFIX_PATH="$PREFIX" \ -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ + -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ -DZIG_TARGET_TRIPLE="$TARGET" \ -DZIG_TARGET_MCPU="$MCPU" \ -DZIG_STATIC=ON \ -DZIG_NO_LIB=ON \ -GNinja -# Now cmake will use zig as the C/C++ compiler. We reset the environment variables -# so that installation and testing do not get affected by them. -unset CC -unset CXX - ninja install # Must be done after zig cc is finished. diff --git a/ci/aarch64-openbsd-release.sh b/ci/aarch64-openbsd-release.sh index 5b1d78ad79bc084492ee2cc9a58b3fb4c3d64cab..fc48ea7ec563a8ce10797c8a07cfc28fa6df674a 100755 --- a/ci/aarch64-openbsd-release.sh +++ b/ci/aarch64-openbsd-release.sh @@ -22,24 +22,18 @@ export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" mkdir -p build-release cd build-release -export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" -export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" - cmake .. \ -DCMAKE_INSTALL_PREFIX="stage3-release" \ -DCMAKE_PREFIX_PATH="$PREFIX" \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ + -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ -DZIG_TARGET_TRIPLE="$TARGET" \ -DZIG_TARGET_MCPU="$MCPU" \ -DZIG_STATIC=ON \ -DZIG_NO_LIB=ON \ -GNinja -# Now cmake will use zig as the C/C++ compiler. We reset the environment variables -# so that installation and testing do not get affected by them. -unset CC -unset CXX - ninja install # Must be done after zig cc is finished. diff --git a/ci/loongarch64-linux-debug.sh b/ci/loongarch64-linux-debug.sh index bcf848d07adb7ecd3e32c7a93d1af46e540aaad3..1975fb7993679910e0b5f16e5064c8c3466546dc 100755 --- a/ci/loongarch64-linux-debug.sh +++ b/ci/loongarch64-linux-debug.sh @@ -22,24 +22,18 @@ export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" mkdir -p build-debug cd build-debug -export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" -export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" - cmake .. \ -DCMAKE_INSTALL_PREFIX="stage3-debug" \ -DCMAKE_PREFIX_PATH="$PREFIX" \ -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ + -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ -DZIG_TARGET_TRIPLE="$TARGET" \ -DZIG_TARGET_MCPU="$MCPU" \ -DZIG_STATIC=ON \ -DZIG_NO_LIB=ON \ -GNinja -# Now cmake will use zig as the C/C++ compiler. We reset the environment variables -# so that installation and testing do not get affected by them. -unset CC -unset CXX - ninja install # Must be done after zig cc is finished. diff --git a/ci/loongarch64-linux-release.sh b/ci/loongarch64-linux-release.sh index 5e1ded5744baab636ec866ba42d53c4e11646f3b..8f983b6d3a2add3a8faca73691a1327813175eb0 100755 --- a/ci/loongarch64-linux-release.sh +++ b/ci/loongarch64-linux-release.sh @@ -22,24 +22,18 @@ export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" mkdir -p build-release cd build-release -export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" -export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" - cmake .. \ -DCMAKE_INSTALL_PREFIX="stage3-release" \ -DCMAKE_PREFIX_PATH="$PREFIX" \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ + -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ -DZIG_TARGET_TRIPLE="$TARGET" \ -DZIG_TARGET_MCPU="$MCPU" \ -DZIG_STATIC=ON \ -DZIG_NO_LIB=ON \ -GNinja -# Now cmake will use zig as the C/C++ compiler. We reset the environment variables -# so that installation and testing do not get affected by them. -unset CC -unset CXX - ninja install # Must be done after zig cc is finished. diff --git a/ci/powerpc64le-linux-debug.sh b/ci/powerpc64le-linux-debug.sh index b5855792064a5eb15b6a989288b95d5bd4acb053..ff7143c296c0dd8c722570ccd19aa0c387a96083 100755 --- a/ci/powerpc64le-linux-debug.sh +++ b/ci/powerpc64le-linux-debug.sh @@ -22,24 +22,18 @@ export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" mkdir -p build-debug cd build-debug -export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" -export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" - cmake .. \ -DCMAKE_INSTALL_PREFIX="stage3-debug" \ -DCMAKE_PREFIX_PATH="$PREFIX" \ -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ + -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ -DZIG_TARGET_TRIPLE="$TARGET" \ -DZIG_TARGET_MCPU="$MCPU" \ -DZIG_STATIC=ON \ -DZIG_NO_LIB=ON \ -GNinja -# Now cmake will use zig as the C/C++ compiler. We reset the environment variables -# so that installation and testing do not get affected by them. -unset CC -unset CXX - ninja install # Must be done after zig cc is finished. diff --git a/ci/powerpc64le-linux-release.sh b/ci/powerpc64le-linux-release.sh index 06bdcbabe912cf2bc00b1ecdf20ff55c200c6a53..527265cc67a6aad1aefc2a3a7828e9c00e7577a5 100755 --- a/ci/powerpc64le-linux-release.sh +++ b/ci/powerpc64le-linux-release.sh @@ -22,24 +22,18 @@ export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" mkdir -p build-release cd build-release -export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" -export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" - cmake .. \ -DCMAKE_INSTALL_PREFIX="stage3-release" \ -DCMAKE_PREFIX_PATH="$PREFIX" \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ + -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ -DZIG_TARGET_TRIPLE="$TARGET" \ -DZIG_TARGET_MCPU="$MCPU" \ -DZIG_STATIC=ON \ -DZIG_NO_LIB=ON \ -GNinja -# Now cmake will use zig as the C/C++ compiler. We reset the environment variables -# so that installation and testing do not get affected by them. -unset CC -unset CXX - ninja install # Must be done after zig cc is finished. diff --git a/ci/riscv64-linux-debug.sh b/ci/riscv64-linux-debug.sh index a7b6cf2df2b1f52d2ab4aac0f72cc8deade8e5b6..20ce6c572bd0a3e3d42369f3f6d999e06dded3ff 100755 --- a/ci/riscv64-linux-debug.sh +++ b/ci/riscv64-linux-debug.sh @@ -22,24 +22,18 @@ export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" mkdir -p build-debug cd build-debug -export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" -export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" - cmake .. \ -DCMAKE_INSTALL_PREFIX="stage3-debug" \ -DCMAKE_PREFIX_PATH="$PREFIX" \ -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ + -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ -DZIG_TARGET_TRIPLE="$TARGET" \ -DZIG_TARGET_MCPU="$MCPU" \ -DZIG_STATIC=ON \ -DZIG_NO_LIB=ON \ -GNinja -# Now cmake will use zig as the C/C++ compiler. We reset the environment variables -# so that installation and testing do not get affected by them. -unset CC -unset CXX - ninja install # Must be done after zig cc is finished. diff --git a/ci/riscv64-linux-release.sh b/ci/riscv64-linux-release.sh index 8044034933008d8c7f6b29c28f311837bc766ca0..b1096e935b674c0eaffb4ebfd461094439a2cd45 100755 --- a/ci/riscv64-linux-release.sh +++ b/ci/riscv64-linux-release.sh @@ -22,24 +22,18 @@ export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" mkdir -p build-release cd build-release -export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" -export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" - cmake .. \ -DCMAKE_INSTALL_PREFIX="stage3-release" \ -DCMAKE_PREFIX_PATH="$PREFIX" \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ + -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ -DZIG_TARGET_TRIPLE="$TARGET" \ -DZIG_TARGET_MCPU="$MCPU" \ -DZIG_STATIC=ON \ -DZIG_NO_LIB=ON \ -GNinja -# Now cmake will use zig as the C/C++ compiler. We reset the environment variables -# so that installation and testing do not get affected by them. -unset CC -unset CXX - ninja install # Must be done after zig cc is finished. diff --git a/ci/s390x-linux-debug.sh b/ci/s390x-linux-debug.sh index 9724ae1e3ec39869299f232d99b208a9cfb2bdd2..872ae25d161d021e1d5b3f275c7d70f17bfd1eb0 100755 --- a/ci/s390x-linux-debug.sh +++ b/ci/s390x-linux-debug.sh @@ -22,24 +22,18 @@ export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" mkdir -p build-debug cd build-debug -export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" -export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" - cmake .. \ -DCMAKE_INSTALL_PREFIX="stage3-debug" \ -DCMAKE_PREFIX_PATH="$PREFIX" \ -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ + -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ -DZIG_TARGET_TRIPLE="$TARGET" \ -DZIG_TARGET_MCPU="$MCPU" \ -DZIG_STATIC=ON \ -DZIG_NO_LIB=ON \ -GNinja -# Now cmake will use zig as the C/C++ compiler. We reset the environment variables -# so that installation and testing do not get affected by them. -unset CC -unset CXX - ninja install # Must be done after zig cc is finished. diff --git a/ci/s390x-linux-release.sh b/ci/s390x-linux-release.sh index acbae579364afff7c76f2b65ea857fc18c984866..7f025780506a5a0c5978ecc80133e574ad481ccd 100755 --- a/ci/s390x-linux-release.sh +++ b/ci/s390x-linux-release.sh @@ -22,24 +22,18 @@ export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" mkdir -p build-release cd build-release -export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" -export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" - cmake .. \ -DCMAKE_INSTALL_PREFIX="stage3-release" \ -DCMAKE_PREFIX_PATH="$PREFIX" \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ + -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ -DZIG_TARGET_TRIPLE="$TARGET" \ -DZIG_TARGET_MCPU="$MCPU" \ -DZIG_STATIC=ON \ -DZIG_NO_LIB=ON \ -GNinja -# Now cmake will use zig as the C/C++ compiler. We reset the environment variables -# so that installation and testing do not get affected by them. -unset CC -unset CXX - ninja install # Must be done after zig cc is finished. diff --git a/ci/x86_64-freebsd-debug.sh b/ci/x86_64-freebsd-debug.sh index 24df6caf49cfe1342855f52277f1e52faa2633b1..ccb9a946c764589e46232610d9658d9b4e64aa00 100755 --- a/ci/x86_64-freebsd-debug.sh +++ b/ci/x86_64-freebsd-debug.sh @@ -22,24 +22,18 @@ export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" mkdir -p build-debug cd build-debug -export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" -export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" - cmake .. \ -DCMAKE_INSTALL_PREFIX="stage3-debug" \ -DCMAKE_PREFIX_PATH="$PREFIX" \ -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ + -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ -DZIG_TARGET_TRIPLE="$TARGET" \ -DZIG_TARGET_MCPU="$MCPU" \ -DZIG_STATIC=ON \ -DZIG_NO_LIB=ON \ -GNinja -# Now cmake will use zig as the C/C++ compiler. We reset the environment variables -# so that installation and testing do not get affected by them. -unset CC -unset CXX - ninja install # Must be done after zig cc is finished. diff --git a/ci/x86_64-freebsd-release.sh b/ci/x86_64-freebsd-release.sh index eed9cdc982a80a9162aac1a1fa87ef6d4b246264..ad6e2ab18583c5f134fcde5c02ee8c2c705ac31a 100755 --- a/ci/x86_64-freebsd-release.sh +++ b/ci/x86_64-freebsd-release.sh @@ -22,24 +22,18 @@ export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" mkdir -p build-release cd build-release -export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" -export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" - cmake .. \ -DCMAKE_INSTALL_PREFIX="stage3-release" \ -DCMAKE_PREFIX_PATH="$PREFIX" \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ + -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ -DZIG_TARGET_TRIPLE="$TARGET" \ -DZIG_TARGET_MCPU="$MCPU" \ -DZIG_STATIC=ON \ -DZIG_NO_LIB=ON \ -GNinja -# Now cmake will use zig as the C/C++ compiler. We reset the environment variables -# so that installation and testing do not get affected by them. -unset CC -unset CXX - ninja install # Must be done after zig cc is finished. diff --git a/ci/x86_64-linux-debug-llvm.sh b/ci/x86_64-linux-debug-llvm.sh index 69015c03e866d5fb2a62d7e7a140958c6e588f7d..86709f28b79615d5e752922191d30a7541732455 100755 --- a/ci/x86_64-linux-debug-llvm.sh +++ b/ci/x86_64-linux-debug-llvm.sh @@ -22,13 +22,12 @@ export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" mkdir -p build-debug-llvm cd build-debug-llvm -export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" -export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" - cmake .. \ -DCMAKE_INSTALL_PREFIX="stage3-debug" \ -DCMAKE_PREFIX_PATH="$PREFIX" \ -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ + -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ -DZIG_TARGET_TRIPLE="$TARGET" \ -DZIG_TARGET_MCPU="$MCPU" \ -DZIG_STATIC=ON \ @@ -36,11 +35,6 @@ cmake .. \ -DZIG_EXTRA_BUILD_ARGS="-Duse-llvm=true" \ -GNinja -# Now cmake will use zig as the C/C++ compiler. We reset the environment variables -# so that installation and testing do not get affected by them. -unset CC -unset CXX - ninja install # Must be done after zig cc is finished. diff --git a/ci/x86_64-linux-debug.sh b/ci/x86_64-linux-debug.sh index b88f98b59765fe24ba2d773e0a35516508f14280..3cdb7d7586693ffc18a4aaa4f6eb79961ccdc303 100755 --- a/ci/x86_64-linux-debug.sh +++ b/ci/x86_64-linux-debug.sh @@ -22,24 +22,18 @@ export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" mkdir -p build-debug cd build-debug -export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" -export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" - cmake .. \ -DCMAKE_INSTALL_PREFIX="stage3-debug" \ -DCMAKE_PREFIX_PATH="$PREFIX" \ -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ + -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ -DZIG_TARGET_TRIPLE="$TARGET" \ -DZIG_TARGET_MCPU="$MCPU" \ -DZIG_STATIC=ON \ -DZIG_NO_LIB=ON \ -GNinja -# Now cmake will use zig as the C/C++ compiler. We reset the environment variables -# so that installation and testing do not get affected by them. -unset CC -unset CXX - ninja install # Must be done after zig cc is finished. diff --git a/ci/x86_64-linux-release.sh b/ci/x86_64-linux-release.sh index d54769e968550bae4b1ed888567b6e077a966230..ceb7ab6f2f0311c9ffbb342c11072d9748cc40fa 100755 --- a/ci/x86_64-linux-release.sh +++ b/ci/x86_64-linux-release.sh @@ -28,24 +28,18 @@ cc -o bootstrap bootstrap.c mkdir -p build-release cd build-release -export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" -export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" - cmake .. \ -DCMAKE_INSTALL_PREFIX="stage3-release" \ -DCMAKE_PREFIX_PATH="$PREFIX" \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ + -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ -DZIG_TARGET_TRIPLE="$TARGET" \ -DZIG_TARGET_MCPU="$MCPU" \ -DZIG_STATIC=ON \ -DZIG_NO_LIB=ON \ -GNinja -# Now cmake will use zig as the C/C++ compiler. We reset the environment variables -# so that installation and testing do not get affected by them. -unset CC -unset CXX - ninja install # Must not be set while using the other `zig cc` which has its own zig lib dir. @@ -98,22 +92,19 @@ stage3-release/bin/zig build update-zig1 mkdir -p ../build-new cd ../build-new -export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" -export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" unset ZIG_LIB_DIR cmake .. \ -DCMAKE_PREFIX_PATH="$PREFIX" \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ + -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ -DZIG_TARGET_TRIPLE="$TARGET" \ -DZIG_TARGET_MCPU="$MCPU" \ -DZIG_STATIC=ON \ -DZIG_NO_LIB=ON \ -GNinja -unset CC -unset CXX - ninja install export ZIG_LIB_DIR="$PWD/../lib" diff --git a/ci/x86_64-netbsd-debug.sh b/ci/x86_64-netbsd-debug.sh index 4eeb9b39427c9247539d6836785f66e548fd42e4..1de7b01c6684a0505dbda291dde918235681d89d 100755 --- a/ci/x86_64-netbsd-debug.sh +++ b/ci/x86_64-netbsd-debug.sh @@ -22,24 +22,18 @@ export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" mkdir -p build-debug cd build-debug -export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" -export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" - cmake .. \ -DCMAKE_INSTALL_PREFIX="stage3-debug" \ -DCMAKE_PREFIX_PATH="$PREFIX" \ -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ + -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ -DZIG_TARGET_TRIPLE="$TARGET" \ -DZIG_TARGET_MCPU="$MCPU" \ -DZIG_STATIC=ON \ -DZIG_NO_LIB=ON \ -GNinja -# Now cmake will use zig as the C/C++ compiler. We reset the environment variables -# so that installation and testing do not get affected by them. -unset CC -unset CXX - ninja install # Must be done after zig cc is finished. diff --git a/ci/x86_64-netbsd-release.sh b/ci/x86_64-netbsd-release.sh index a283127f6179c13cabcc7c2aebf6f0bddc9d54c6..c3792943daec12e37b4cd5d4e9c040c919745f13 100755 --- a/ci/x86_64-netbsd-release.sh +++ b/ci/x86_64-netbsd-release.sh @@ -22,24 +22,18 @@ export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" mkdir -p build-release cd build-release -export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" -export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" - cmake .. \ -DCMAKE_INSTALL_PREFIX="stage3-release" \ -DCMAKE_PREFIX_PATH="$PREFIX" \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ + -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ -DZIG_TARGET_TRIPLE="$TARGET" \ -DZIG_TARGET_MCPU="$MCPU" \ -DZIG_STATIC=ON \ -DZIG_NO_LIB=ON \ -GNinja -# Now cmake will use zig as the C/C++ compiler. We reset the environment variables -# so that installation and testing do not get affected by them. -unset CC -unset CXX - ninja install # Must be done after zig cc is finished. diff --git a/ci/x86_64-openbsd-debug.sh b/ci/x86_64-openbsd-debug.sh index 4b0dfba7549d64098b9d3bd3a3f5c44b84218ebf..e28bf3a24fb95043b7124e933895bb0976c1a9c5 100755 --- a/ci/x86_64-openbsd-debug.sh +++ b/ci/x86_64-openbsd-debug.sh @@ -22,24 +22,18 @@ export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" mkdir -p build-debug cd build-debug -export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" -export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" - cmake .. \ -DCMAKE_INSTALL_PREFIX="stage3-debug" \ -DCMAKE_PREFIX_PATH="$PREFIX" \ -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ + -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ -DZIG_TARGET_TRIPLE="$TARGET" \ -DZIG_TARGET_MCPU="$MCPU" \ -DZIG_STATIC=ON \ -DZIG_NO_LIB=ON \ -GNinja -# Now cmake will use zig as the C/C++ compiler. We reset the environment variables -# so that installation and testing do not get affected by them. -unset CC -unset CXX - ninja install # Must be done after zig cc is finished. diff --git a/ci/x86_64-openbsd-release.sh b/ci/x86_64-openbsd-release.sh index fc39f5b3473dcfdd808c58cd91a4f3aaf59053fd..f5c62306120925ddd26bc3fa367bcd1246369d4b 100755 --- a/ci/x86_64-openbsd-release.sh +++ b/ci/x86_64-openbsd-release.sh @@ -22,24 +22,18 @@ export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" mkdir -p build-release cd build-release -export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" -export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" - cmake .. \ -DCMAKE_INSTALL_PREFIX="stage3-release" \ -DCMAKE_PREFIX_PATH="$PREFIX" \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ + -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ -DZIG_TARGET_TRIPLE="$TARGET" \ -DZIG_TARGET_MCPU="$MCPU" \ -DZIG_STATIC=ON \ -DZIG_NO_LIB=ON \ -GNinja -# Now cmake will use zig as the C/C++ compiler. We reset the environment variables -# so that installation and testing do not get affected by them. -unset CC -unset CXX - ninja install # Must be done after zig cc is finished. -- 2.54.0 From 1c7de8420fe7af4ab86433024816de7b0727c8eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 9 Sep 2026 15:00:36 +0200 Subject: [PATCH 09/11] ci: zig -> zig.exe in windows scripts for consistency --- ci/aarch64-windows-debug.ps1 | 2 +- ci/aarch64-windows-release.ps1 | 2 +- ci/x86_64-windows-debug.ps1 | 6 +++--- ci/x86_64-windows-release.ps1 | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ci/aarch64-windows-debug.ps1 b/ci/aarch64-windows-debug.ps1 index b031bed87a8d2ca1d79a641fcfd42cb68bd24434..f357373bc2f29111a0fae695eae1abe4e25d3704 100644 --- a/ci/aarch64-windows-debug.ps1 +++ b/ci/aarch64-windows-debug.ps1 @@ -47,7 +47,7 @@ CheckLastExitCode $Env:ZIG_LIB_DIR="$(Get-Location)\..\lib" Write-Output "Main test suite..." -stage3-debug\bin\zig build test docs ` +stage3-debug\bin\zig.exe build test docs ` --maxrss $ZSF_MAX_RSS ` --search-prefix "$PREFIX_PATH" ` -Dstatic-llvm ` diff --git a/ci/aarch64-windows-release.ps1 b/ci/aarch64-windows-release.ps1 index 210ff4a9c708195706a120770e8da086b0ef6c24..642428fd3f2c8f78bd7a06db73d24c37bb024b56 100644 --- a/ci/aarch64-windows-release.ps1 +++ b/ci/aarch64-windows-release.ps1 @@ -75,7 +75,7 @@ stage3-release\bin\zig.exe build ` -Dtarget="$TARGET" ` -Dcpu="$MCPU" ` -Duse-zig-libcxx ` - -Dversion-string="$(stage3-release\bin\zig version)" + -Dversion-string="$(stage3-release\bin\zig.exe version)" CheckLastExitCode # Compare-Object returns an error code if the files differ. diff --git a/ci/x86_64-windows-debug.ps1 b/ci/x86_64-windows-debug.ps1 index ba86acfdbddc0b2daf3bec7ecee1624c29b6ba10..162e901e791af0cf4feaf5b3a7600bdc57e858d5 100644 --- a/ci/x86_64-windows-debug.ps1 +++ b/ci/x86_64-windows-debug.ps1 @@ -47,7 +47,7 @@ CheckLastExitCode $Env:ZIG_LIB_DIR="$(Get-Location)\..\lib" Write-Output "Main test suite..." -stage3-debug\bin\zig build test docs ` +stage3-debug\bin\zig.exe build test docs ` --maxrss $ZSF_MAX_RSS ` --search-prefix "$PREFIX_PATH" ` -Dstatic-llvm ` @@ -58,7 +58,7 @@ stage3-debug\bin\zig build test docs ` CheckLastExitCode Write-Output "Build x86_64-windows-msvc behavior tests using the C backend..." -stage3-debug\bin\zig build-obj ` +stage3-debug\bin\zig.exe build-obj ` -ofmt=c ` -OReleaseSmall ` --name compiler_rt ` @@ -68,7 +68,7 @@ stage3-debug\bin\zig build-obj ` ..\lib\compiler_rt.zig CheckLastExitCode -stage3-debug\bin\zig test ` +stage3-debug\bin\zig.exe test ` -ofmt=c ` -femit-bin="behavior-x86_64-windows-msvc.c" ` --test-no-exec ` diff --git a/ci/x86_64-windows-release.ps1 b/ci/x86_64-windows-release.ps1 index af0e2c7f072602e5d65e408b38a8e9ec9ee4da91..d838fd92e0af069b3d0b25bd41d29f62930eedb0 100644 --- a/ci/x86_64-windows-release.ps1 +++ b/ci/x86_64-windows-release.ps1 @@ -75,7 +75,7 @@ stage3-release\bin\zig.exe build ` -Dtarget="$TARGET" ` -Dcpu="$MCPU" ` -Duse-zig-libcxx ` - -Dversion-string="$(stage3-release\bin\zig version)" + -Dversion-string="$(stage3-release\bin\zig.exe version)" CheckLastExitCode # Compare-Object returns an error code if the files differ. -- 2.54.0 From 49f6f8766dcf4a386d71f5ec9731d400bed071c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 9 Sep 2026 15:00:52 +0200 Subject: [PATCH 10/11] ci: add stage4 build + behavior tests to *-windows-debug scripts Consistent with all other platforms. --- ci/aarch64-windows-debug.ps1 | 15 +++++++++++++++ ci/x86_64-windows-debug.ps1 | 15 +++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/ci/aarch64-windows-debug.ps1 b/ci/aarch64-windows-debug.ps1 index f357373bc2f29111a0fae695eae1abe4e25d3704..f1d48e39d48ab49530ef98d4e7e018463f33fb05 100644 --- a/ci/aarch64-windows-debug.ps1 +++ b/ci/aarch64-windows-debug.ps1 @@ -56,3 +56,18 @@ stage3-debug\bin\zig.exe build test docs ` -Denable-symlinks-windows ` --test-timeout 30m CheckLastExitCode + +Write-Output "Build and test stage4..." +stage3-debug\bin\zig.exe build ` + --prefix stage4-debug ` + -Denable-llvm ` + -Dno-lib ` + -Doptimize=Debug ` + -Dtarget="$TARGET" ` + -Dcpu="$MCPU" ` + -Duse-zig-libcxx ` + -Dversion-string="$(stage3-debug\bin\zig.exe version)" +CheckLastExitCode + +stage4-debug\bin\zig.exe test ..\test\behavior.zig +CheckLastExitCode diff --git a/ci/x86_64-windows-debug.ps1 b/ci/x86_64-windows-debug.ps1 index 162e901e791af0cf4feaf5b3a7600bdc57e858d5..451eb3d8299d2ab2584fe07807c7280b3673d6aa 100644 --- a/ci/x86_64-windows-debug.ps1 +++ b/ci/x86_64-windows-debug.ps1 @@ -57,6 +57,21 @@ stage3-debug\bin\zig.exe build test docs ` --test-timeout 30m CheckLastExitCode +Write-Output "Build and test stage4..." +stage3-debug\bin\zig.exe build ` + --prefix stage4-debug ` + -Denable-llvm ` + -Dno-lib ` + -Doptimize=Debug ` + -Dtarget="$TARGET" ` + -Dcpu="$MCPU" ` + -Duse-zig-libcxx ` + -Dversion-string="$(stage3-debug\bin\zig.exe version)" +CheckLastExitCode + +stage4-debug\bin\zig.exe test ..\test\behavior.zig +CheckLastExitCode + Write-Output "Build x86_64-windows-msvc behavior tests using the C backend..." stage3-debug\bin\zig.exe build-obj ` -ofmt=c ` -- 2.54.0 From 114af83d3f01948d79263a7cf1f67175a1981a29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 9 Sep 2026 13:50:26 +0200 Subject: [PATCH 11/11] ci: remove -Dskip-test-incremental from windows scripts Seems to have been missed in https://codeberg.org/ziglang/zig/pulls/36706. --- ci/aarch64-windows-debug.ps1 | 1 - ci/aarch64-windows-release.ps1 | 1 - ci/x86_64-windows-debug.ps1 | 1 - ci/x86_64-windows-release.ps1 | 1 - 4 files changed, 4 deletions(-) diff --git a/ci/aarch64-windows-debug.ps1 b/ci/aarch64-windows-debug.ps1 index f1d48e39d48ab49530ef98d4e7e018463f33fb05..c5232c8d06ecfa139bfeadce1f2a8c6b30c56381 100644 --- a/ci/aarch64-windows-debug.ps1 +++ b/ci/aarch64-windows-debug.ps1 @@ -52,7 +52,6 @@ stage3-debug\bin\zig.exe build test docs ` --search-prefix "$PREFIX_PATH" ` -Dstatic-llvm ` -Dskip-non-native ` - -Dskip-test-incremental ` -Denable-symlinks-windows ` --test-timeout 30m CheckLastExitCode diff --git a/ci/aarch64-windows-release.ps1 b/ci/aarch64-windows-release.ps1 index 642428fd3f2c8f78bd7a06db73d24c37bb024b56..26b95dfc2e60a518431dd9c214594623a1efd3b4 100644 --- a/ci/aarch64-windows-release.ps1 +++ b/ci/aarch64-windows-release.ps1 @@ -52,7 +52,6 @@ stage3-release\bin\zig.exe build test docs ` --search-prefix "$PREFIX_PATH" ` -Dstatic-llvm ` -Dskip-non-native ` - -Dskip-test-incremental ` -Denable-symlinks-windows ` --test-timeout 30m CheckLastExitCode diff --git a/ci/x86_64-windows-debug.ps1 b/ci/x86_64-windows-debug.ps1 index 451eb3d8299d2ab2584fe07807c7280b3673d6aa..5914c3c9e4d6efe6fccfe0cbba58b808206c0d74 100644 --- a/ci/x86_64-windows-debug.ps1 +++ b/ci/x86_64-windows-debug.ps1 @@ -52,7 +52,6 @@ stage3-debug\bin\zig.exe build test docs ` --search-prefix "$PREFIX_PATH" ` -Dstatic-llvm ` -Dskip-non-native ` - -Dskip-test-incremental ` -Denable-symlinks-windows ` --test-timeout 30m CheckLastExitCode diff --git a/ci/x86_64-windows-release.ps1 b/ci/x86_64-windows-release.ps1 index d838fd92e0af069b3d0b25bd41d29f62930eedb0..07ac431c499c1becce5b10869d9abfb58c763b85 100644 --- a/ci/x86_64-windows-release.ps1 +++ b/ci/x86_64-windows-release.ps1 @@ -52,7 +52,6 @@ stage3-release\bin\zig.exe build test docs ` --search-prefix "$PREFIX_PATH" ` -Dstatic-llvm ` -Dskip-non-native ` - -Dskip-test-incremental ` -Denable-symlinks-windows ` --test-timeout 30m CheckLastExitCode -- 2.54.0