zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit f7a607ef68c96cb6c5b68cbf762e621aaed95caf (tree)
parent 5d55999d20c4d856ad9e0bd35a939e4aa3be3d0d
Author: Alex Rønne Petersen <alex@alexrp.com>
Date:   Fri,  1 May 2026 00:53:56 +0200

Merge branch 'ci-jit-cmd'

Diffstat:
Mci/aarch64-macos-release.sh | 3---
Mci/x86_64-linux-release.sh | 3---
Mci/x86_64-windows-release.ps1 | 4----
Mlib/compiler/std-docs.zig | 2+-
Mtest/tests.zig | 18++++++++++++++++++
5 files changed, 19 insertions(+), 11 deletions(-)

diff --git a/ci/aarch64-macos-release.sh b/ci/aarch64-macos-release.sh @@ -55,9 +55,6 @@ stage3-release/bin/zig build test docs \ stage3-release/bin/zig build test-std --fuzz=1K -Dno-lib -Dfuzz-only -Doptimize=ReleaseSafe stage3-release/bin/zig build test-std --fuzz=1K -Dno-lib -Dfuzz-only -Doptimize=Debug -# Ensure that reduce compiles -stage3-release/bin/zig reduce -h - # Ensure that stage3 and stage4 are byte-for-byte identical. stage3-release/bin/zig build \ --maxrss ${ZSF_MAX_RSS:-0} \ diff --git a/ci/x86_64-linux-release.sh b/ci/x86_64-linux-release.sh @@ -77,9 +77,6 @@ stage3-release/bin/zig build test docs \ stage3-release/bin/zig build test-std --fuzz=1K -Dno-lib -Dfuzz-only -Doptimize=ReleaseSafe stage3-release/bin/zig build test-std --fuzz=1K -Dno-lib -Dfuzz-only -Doptimize=Debug -# Ensure that reduce compiles -stage3-release/bin/zig reduce -h - # Ensure that stage3 and stage4 are byte-for-byte identical. stage3-release/bin/zig build \ --prefix stage4-release \ diff --git a/ci/x86_64-windows-release.ps1 b/ci/x86_64-windows-release.ps1 @@ -61,10 +61,6 @@ CheckLastExitCode # stage3-release\bin\zig.exe build test-std --fuzz=1K -Dno-lib -Dfuzz-only -Doptimize=Debug # CheckLastExitCode -# Ensure that reduce compiles -stage3-release\bin\zig.exe build reduce -h -CheckLastExitCode - # Ensure that stage3 and stage4 are byte-for-byte identical. Write-Output "Build and compare stage4..." stage3-release\bin\zig.exe build ` diff --git a/lib/compiler/std-docs.zig b/lib/compiler/std-docs.zig @@ -18,7 +18,7 @@ fn usage(io: Io) noreturn { \\ By default, enabled unless a port is specified. \\ ) catch {}; - std.process.exit(1); + std.process.exit(0); } pub fn main(init: std.process.Init) !void { diff --git a/test/tests.zig b/test/tests.zig @@ -2238,6 +2238,24 @@ pub fn addCliTests(b: *std.Build) *Step { const s = std.fs.path.sep_str; { + // Test that all JIT'd commands compile. + for (&[_][]const u8{ + "libc", + "objcopy", + "objdump", + "rc", + "reduce", + "std", + }) |cmd| { + const run_help = b.addSystemCommand(&.{ b.graph.zig_exe, cmd, "--help" }); + run_help.setName(b.fmt("zig {s} --help", .{cmd})); + run_help.expectStdErrEqual(""); + run_help.expectExitCode(0); + step.dependOn(&run_help.step); + } + } + + { // Test `zig init`. const tmp_path = b.tmpPath(); const init_exe = b.addSystemCommand(&.{ b.graph.zig_exe, "init" });