diff --git a/ci/launcher b/ci/launcher index 011f83b..3a4f31f 100755 --- a/ci/launcher +++ b/ci/launcher @@ -3,6 +3,16 @@ set -xeuo pipefail ZIG=${ZIG:-bazel run "$@" @zig_sdk//:zig --} +for target in \ + aarch64-linux-gnu.2.19 \ + aarch64-macos-none \ + x86_64-linux-gnu.2.19 \ + x86_64-macos-none \ + x86_64-windows-gnu +do + $ZIG build-exe -fno-emit-bin -target $target toolchain/launcher.zig +done + # until bazel-zig-cc gets a zig toolchain, run launcher's unit tests here. $ZIG test toolchain/launcher.zig diff --git a/toolchain/launcher.zig b/toolchain/launcher.zig index 1043f49..b2a907a 100644 --- a/toolchain/launcher.zig +++ b/toolchain/launcher.zig @@ -121,7 +121,7 @@ pub fn main() u8 { switch (action) { .early_ok => return 0, - .early_err => |msg| return fatal(msg), + .early_err => |msg| return fatal("{s}", .{msg}), .exec => |params| { if (builtin.os.tag == .windows) return spawnWindows(arena, params) @@ -240,7 +240,7 @@ fn parseFatal( } pub fn fatal(comptime fmt: []const u8, args: anytype) u8 { - fmt.debug.print(fmt, args); + std.debug.print(fmt, args); return 1; }