From d045eb7a4af758e3483e5e8fd9bdbe725095fdec Mon Sep 17 00:00:00 2001 From: Alex Kladov Date: Mon, 14 Jul 2025 16:12:55 +0100 Subject: [PATCH 1/8] langref: make example more interesting. As written, I think langref's example is actually a poor reason to use `inline`. If you have if (foo(1200, 34) != 1234) { @compileError("bad"); } and you want to make sure that the call is executed at compile time, the right way to fix it is to add comptime if (comptime foo(1200, 34) != 1234) { @compileError("bad"); } and not to make the function `inline`. I _think_ that inlining functions just to avoid `comptime` at a call-site is an anti-pattern. When the reader sees `foo(123)` at the call-site, they _expect_ this to be a runtime call, as that's the normal rule in Zig. Inline is still necessary when you can't make the _whole_ call `comptime`, because it has some runtime effects, but you still want comptime-known result. A good example here is inline fn findImportPkgHashOrFatal(b: *Build, comptime asking_build_zig: type, comptime dep_name: []const u8) []const u8 { from Build.zig, where the `b` argument is runtime, and is used for side-effects, but where the result is comptime. I don't know of a good small example to demonstrate the subtelty here, so I went ahead with just adding a runtime print to `foo`. Hopefully it'll be enough for motivated reader to appreciate the subtelty! --- doc/langref/inline_call.zig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/langref/inline_call.zig b/doc/langref/inline_call.zig index a0cc1440ae..17625884bd 100644 --- a/doc/langref/inline_call.zig +++ b/doc/langref/inline_call.zig @@ -1,3 +1,5 @@ +const std = @import("std"); + test "inline function call" { if (foo(1200, 34) != 1234) { @compileError("bad"); @@ -5,6 +7,7 @@ test "inline function call" { } inline fn foo(a: i32, b: i32) i32 { + std.debug.print("runtime a = {} b = {}", .{ a, b }); return a + b; } From 96bb1137c23688f01283be24ac9b52e1440afded Mon Sep 17 00:00:00 2001 From: Alex Kladov Date: Mon, 14 Jul 2025 17:32:50 +0100 Subject: [PATCH 2/8] langref: don't encourage printing to stderr in tests The rule: `pub fn main` owns file descriptors 0, 1, and 2. If you didn't write `pub fn main()` it is, in general, not your business to print to stderr. --- doc/langref/defer_unwind.zig | 4 ++-- doc/langref/inline_call.zig | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/langref/defer_unwind.zig b/doc/langref/defer_unwind.zig index dfd729dc5b..ebcca130a6 100644 --- a/doc/langref/defer_unwind.zig +++ b/doc/langref/defer_unwind.zig @@ -2,7 +2,7 @@ const std = @import("std"); const expect = std.testing.expect; const print = std.debug.print; -test "defer unwinding" { +pub fn main() void { print("\n", .{}); defer { @@ -19,4 +19,4 @@ test "defer unwinding" { } } -// test +// exe=succeed diff --git a/doc/langref/inline_call.zig b/doc/langref/inline_call.zig index 17625884bd..d1ee6a72ae 100644 --- a/doc/langref/inline_call.zig +++ b/doc/langref/inline_call.zig @@ -1,6 +1,6 @@ const std = @import("std"); -test "inline function call" { +pub fn main() void { if (foo(1200, 34) != 1234) { @compileError("bad"); } @@ -11,4 +11,4 @@ inline fn foo(a: i32, b: i32) i32 { return a + b; } -// test +// exe=succeed From d90646d8fbd8658120c39bc2690088c0efa21157 Mon Sep 17 00:00:00 2001 From: Alex Kladov Date: Mon, 14 Jul 2025 17:34:52 +0100 Subject: [PATCH 3/8] langref: remove dead code --- doc/langref/defer_unwind.zig | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/langref/defer_unwind.zig b/doc/langref/defer_unwind.zig index ebcca130a6..65fe11015b 100644 --- a/doc/langref/defer_unwind.zig +++ b/doc/langref/defer_unwind.zig @@ -1,5 +1,4 @@ const std = @import("std"); -const expect = std.testing.expect; const print = std.debug.print; pub fn main() void { From 34d7cf075e831c2f2a078f85513401c8559748cf Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 14 Jul 2025 18:26:18 -0700 Subject: [PATCH 4/8] std.posix: skip flaky test tracked by #24380 --- lib/std/posix/test.zig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/std/posix/test.zig b/lib/std/posix/test.zig index 499bdd32cc..8199be65aa 100644 --- a/lib/std/posix/test.zig +++ b/lib/std/posix/test.zig @@ -1001,6 +1001,11 @@ test "sigset_t bits" { if (native_os == .wasi or native_os == .windows) return error.SkipZigTest; + if (true) { + // https://github.com/ziglang/zig/issues/24380 + return error.SkipZigTest; + } + const S = struct { var expected_sig: i32 = undefined; var handler_called_count: u32 = 0; From deb9f3e88ff309da542f4fd5063f1f1a05cae27d Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 14 Jul 2025 18:37:28 -0700 Subject: [PATCH 5/8] std.Io: handle packed structs better Rather than having the endian-suffixed functions be the preferred ones the unsuffixed ones are the preferred ones and the tricky functions get a special suffix. Makes packed structs read and written the same as integers. closes #12960 --- lib/std/Io/Reader.zig | 130 ++++++++++++++++++++++++++---------------- lib/std/Io/Writer.zig | 9 +-- src/Zcu.zig | 2 +- src/Zcu/PerThread.zig | 2 +- 4 files changed, 83 insertions(+), 60 deletions(-) diff --git a/lib/std/Io/Reader.zig b/lib/std/Io/Reader.zig index c8bd0f3000..d236b67748 100644 --- a/lib/std/Io/Reader.zig +++ b/lib/std/Io/Reader.zig @@ -1094,33 +1094,41 @@ pub inline fn takeInt(r: *Reader, comptime T: type, endian: std.builtin.Endian) return std.mem.readInt(T, try r.takeArray(n), endian); } +/// Asserts the buffer was initialized with a capacity at least `@bitSizeOf(T) / 8`. +pub inline fn peekInt(r: *Reader, comptime T: type, endian: std.builtin.Endian) Error!T { + const n = @divExact(@typeInfo(T).int.bits, 8); + return std.mem.readInt(T, try r.peekArray(n), endian); +} + /// Asserts the buffer was initialized with a capacity at least `n`. pub fn takeVarInt(r: *Reader, comptime Int: type, endian: std.builtin.Endian, n: usize) Error!Int { assert(n <= @sizeOf(Int)); return std.mem.readVarInt(Int, try r.take(n), endian); } +/// Obtains an unaligned pointer to the beginning of the stream, reinterpreted +/// as a pointer to the provided type, advancing the seek position. +/// /// Asserts the buffer was initialized with a capacity at least `@sizeOf(T)`. /// -/// Advances the seek position. -/// /// See also: -/// * `peekStruct` -/// * `takeStructEndian` -pub fn takeStruct(r: *Reader, comptime T: type) Error!*align(1) T { +/// * `peekStructReference` +/// * `takeStruct` +pub fn takeStructReference(r: *Reader, comptime T: type) Error!*align(1) T { // Only extern and packed structs have defined in-memory layout. comptime assert(@typeInfo(T).@"struct".layout != .auto); return @ptrCast(try r.takeArray(@sizeOf(T))); } +/// Obtains an unaligned pointer to the beginning of the stream, reinterpreted +/// as a pointer to the provided type, without advancing the seek position. +/// /// Asserts the buffer was initialized with a capacity at least `@sizeOf(T)`. /// -/// Does not advance the seek position. -/// /// See also: -/// * `takeStruct` -/// * `peekStructEndian` -pub fn peekStruct(r: *Reader, comptime T: type) Error!*align(1) T { +/// * `takeStructReference` +/// * `peekStruct` +pub fn peekStructReference(r: *Reader, comptime T: type) Error!*align(1) T { // Only extern and packed structs have defined in-memory layout. comptime assert(@typeInfo(T).@"struct".layout != .auto); return @ptrCast(try r.peekArray(@sizeOf(T))); @@ -1132,12 +1140,23 @@ pub fn peekStruct(r: *Reader, comptime T: type) Error!*align(1) T { /// when `endian` is comptime-known and matches the host endianness. /// /// See also: -/// * `takeStruct` -/// * `peekStructEndian` -pub inline fn takeStructEndian(r: *Reader, comptime T: type, endian: std.builtin.Endian) Error!T { - var res = (try r.takeStruct(T)).*; - if (native_endian != endian) std.mem.byteSwapAllFields(T, &res); - return res; +/// * `takeStructReference` +/// * `peekStruct` +pub inline fn takeStruct(r: *Reader, comptime T: type, endian: std.builtin.Endian) Error!T { + switch (@typeInfo(T)) { + .@"struct" => |info| switch (info.layout) { + .auto => @compileError("ill-defined memory layout"), + .@"extern" => { + var res = (try r.takeStructReference(T)).*; + if (native_endian != endian) std.mem.byteSwapAllFields(T, &res); + return res; + }, + .@"packed" => { + return takeInt(r, info.backing_integer.?, endian); + }, + }, + else => @compileError("not a struct"), + } } /// Asserts the buffer was initialized with a capacity at least `@sizeOf(T)`. @@ -1146,12 +1165,23 @@ pub inline fn takeStructEndian(r: *Reader, comptime T: type, endian: std.builtin /// when `endian` is comptime-known and matches the host endianness. /// /// See also: -/// * `takeStructEndian` -/// * `peekStruct` -pub inline fn peekStructEndian(r: *Reader, comptime T: type, endian: std.builtin.Endian) Error!T { - var res = (try r.peekStruct(T)).*; - if (native_endian != endian) std.mem.byteSwapAllFields(T, &res); - return res; +/// * `takeStruct` +/// * `peekStructReference` +pub inline fn peekStruct(r: *Reader, comptime T: type, endian: std.builtin.Endian) Error!T { + switch (@typeInfo(T)) { + .@"struct" => |info| switch (info.layout) { + .auto => @compileError("ill-defined memory layout"), + .@"extern" => { + var res = (try r.peekStructReference(T)).*; + if (native_endian != endian) std.mem.byteSwapAllFields(T, &res); + return res; + }, + .@"packed" => { + return peekInt(r, info.backing_integer.?, endian); + }, + }, + else => @compileError("not a struct"), + } } pub const TakeEnumError = Error || error{InvalidEnumTag}; @@ -1517,43 +1547,43 @@ test takeVarInt { try testing.expectError(error.EndOfStream, r.takeVarInt(u16, .little, 1)); } -test takeStruct { +test takeStructReference { var r: Reader = .fixed(&.{ 0x12, 0x00, 0x34, 0x56 }); const S = extern struct { a: u8, b: u16 }; switch (native_endian) { - .little => try testing.expectEqual(@as(S, .{ .a = 0x12, .b = 0x5634 }), (try r.takeStruct(S)).*), - .big => try testing.expectEqual(@as(S, .{ .a = 0x12, .b = 0x3456 }), (try r.takeStruct(S)).*), + .little => try testing.expectEqual(@as(S, .{ .a = 0x12, .b = 0x5634 }), (try r.takeStructReference(S)).*), + .big => try testing.expectEqual(@as(S, .{ .a = 0x12, .b = 0x3456 }), (try r.takeStructReference(S)).*), } - try testing.expectError(error.EndOfStream, r.takeStruct(S)); + try testing.expectError(error.EndOfStream, r.takeStructReference(S)); +} + +test peekStructReference { + var r: Reader = .fixed(&.{ 0x12, 0x00, 0x34, 0x56 }); + const S = extern struct { a: u8, b: u16 }; + switch (native_endian) { + .little => { + try testing.expectEqual(@as(S, .{ .a = 0x12, .b = 0x5634 }), (try r.peekStructReference(S)).*); + try testing.expectEqual(@as(S, .{ .a = 0x12, .b = 0x5634 }), (try r.peekStructReference(S)).*); + }, + .big => { + try testing.expectEqual(@as(S, .{ .a = 0x12, .b = 0x3456 }), (try r.peekStructReference(S)).*); + try testing.expectEqual(@as(S, .{ .a = 0x12, .b = 0x3456 }), (try r.peekStructReference(S)).*); + }, + } +} + +test takeStruct { + var r: Reader = .fixed(&.{ 0x12, 0x00, 0x34, 0x56 }); + const S = extern struct { a: u8, b: u16 }; + try testing.expectEqual(@as(S, .{ .a = 0x12, .b = 0x3456 }), try r.takeStruct(S, .big)); + try testing.expectError(error.EndOfStream, r.takeStruct(S, .little)); } test peekStruct { var r: Reader = .fixed(&.{ 0x12, 0x00, 0x34, 0x56 }); const S = extern struct { a: u8, b: u16 }; - switch (native_endian) { - .little => { - try testing.expectEqual(@as(S, .{ .a = 0x12, .b = 0x5634 }), (try r.peekStruct(S)).*); - try testing.expectEqual(@as(S, .{ .a = 0x12, .b = 0x5634 }), (try r.peekStruct(S)).*); - }, - .big => { - try testing.expectEqual(@as(S, .{ .a = 0x12, .b = 0x3456 }), (try r.peekStruct(S)).*); - try testing.expectEqual(@as(S, .{ .a = 0x12, .b = 0x3456 }), (try r.peekStruct(S)).*); - }, - } -} - -test takeStructEndian { - var r: Reader = .fixed(&.{ 0x12, 0x00, 0x34, 0x56 }); - const S = extern struct { a: u8, b: u16 }; - try testing.expectEqual(@as(S, .{ .a = 0x12, .b = 0x3456 }), try r.takeStructEndian(S, .big)); - try testing.expectError(error.EndOfStream, r.takeStructEndian(S, .little)); -} - -test peekStructEndian { - var r: Reader = .fixed(&.{ 0x12, 0x00, 0x34, 0x56 }); - const S = extern struct { a: u8, b: u16 }; - try testing.expectEqual(@as(S, .{ .a = 0x12, .b = 0x3456 }), try r.peekStructEndian(S, .big)); - try testing.expectEqual(@as(S, .{ .a = 0x12, .b = 0x5634 }), try r.peekStructEndian(S, .little)); + try testing.expectEqual(@as(S, .{ .a = 0x12, .b = 0x3456 }), try r.peekStruct(S, .big)); + try testing.expectEqual(@as(S, .{ .a = 0x12, .b = 0x5634 }), try r.peekStruct(S, .little)); } test takeEnum { diff --git a/lib/std/Io/Writer.zig b/lib/std/Io/Writer.zig index d931248c4d..163e7d7eea 100644 --- a/lib/std/Io/Writer.zig +++ b/lib/std/Io/Writer.zig @@ -796,16 +796,9 @@ pub inline fn writeInt(w: *Writer, comptime T: type, value: T, endian: std.built return w.writeAll(&bytes); } -pub fn writeStruct(w: *Writer, value: anytype) Error!void { - // Only extern and packed structs have defined in-memory layout. - comptime assert(@typeInfo(@TypeOf(value)).@"struct".layout != .auto); - return w.writeAll(std.mem.asBytes(&value)); -} - /// The function is inline to avoid the dead code in case `endian` is /// comptime-known and matches host endianness. -/// TODO: make sure this value is not a reference type -pub inline fn writeStructEndian(w: *Writer, value: anytype, endian: std.builtin.Endian) Error!void { +pub inline fn writeStruct(w: *Writer, value: anytype, endian: std.builtin.Endian) Error!void { switch (@typeInfo(@TypeOf(value))) { .@"struct" => |info| switch (info.layout) { .auto => @compileError("ill-defined memory layout"), diff --git a/src/Zcu.zig b/src/Zcu.zig index 6d07477edc..b2b0f71e32 100644 --- a/src/Zcu.zig +++ b/src/Zcu.zig @@ -2809,7 +2809,7 @@ pub fn loadZirCache(gpa: Allocator, cache_file: std.fs.File) !Zir { var buffer: [2000]u8 = undefined; var file_reader = cache_file.reader(&buffer); return result: { - const header = file_reader.interface.takeStruct(Zir.Header) catch |err| break :result err; + const header = file_reader.interface.takeStructReference(Zir.Header) catch |err| break :result err; break :result loadZirCacheBody(gpa, header.*, &file_reader.interface); } catch |err| switch (err) { error.ReadFailed => return file_reader.err.?, diff --git a/src/Zcu/PerThread.zig b/src/Zcu/PerThread.zig index d4a3d1598f..1be84d964f 100644 --- a/src/Zcu/PerThread.zig +++ b/src/Zcu/PerThread.zig @@ -349,7 +349,7 @@ fn loadZirZoirCache( const cache_br = &cache_fr.interface; // First we read the header to determine the lengths of arrays. - const header = (cache_br.takeStruct(Header) catch |err| switch (err) { + const header = (cache_br.takeStructReference(Header) catch |err| switch (err) { error.ReadFailed => return cache_fr.err.?, // This can happen if Zig bails out of this function between creating // the cached file and writing it. From 294db62d926ef82f2beb86e7e5ddf8d69092864a Mon Sep 17 00:00:00 2001 From: Travis Staloch <1562827+travisstaloch@users.noreply.github.com> Date: Mon, 14 Jul 2025 16:35:23 -0700 Subject: [PATCH 6/8] memory safety fix for Io.Writer.Allocating.toOwnedSlice*() don't forget to save the list. this allows a `testing.checkAllAllocationFailures()` test to pass in one of my projects which newly failed since #24329 was merged. --- lib/std/Io/Writer.zig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/std/Io/Writer.zig b/lib/std/Io/Writer.zig index d931248c4d..e02e7e9440 100644 --- a/lib/std/Io/Writer.zig +++ b/lib/std/Io/Writer.zig @@ -2446,12 +2446,14 @@ pub const Allocating = struct { pub fn toOwnedSlice(a: *Allocating) error{OutOfMemory}![]u8 { var list = a.toArrayList(); + defer a.setArrayList(list); return list.toOwnedSlice(a.allocator); } pub fn toOwnedSliceSentinel(a: *Allocating, comptime sentinel: u8) error{OutOfMemory}![:sentinel]u8 { const gpa = a.allocator; var list = toArrayList(a); + defer a.setArrayList(list); return list.toOwnedSliceSentinel(gpa, sentinel); } From 9dc47599022e2969ef8975624cad630d14984080 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Tue, 15 Jul 2025 03:55:32 +0200 Subject: [PATCH 7/8] zig std: link ws2_32.dll on windows Closes #24450. --- src/main.zig | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.zig b/src/main.zig index 1d178730b0..37b137ea94 100644 --- a/src/main.zig +++ b/src/main.zig @@ -334,6 +334,7 @@ fn mainArgs(gpa: Allocator, arena: Allocator, args: []const []const u8) !void { return jitCmd(gpa, arena, cmd_args, .{ .cmd_name = "std", .root_src_path = "std-docs.zig", + .windows_libs = &.{"ws2_32"}, .prepend_zig_lib_dir_path = true, .prepend_zig_exe_path = true, .prepend_global_cache_path = true, From 0cb558ba3abb0ac7b48c1a30c9a13c924f950172 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 14 Jul 2025 09:40:17 -0700 Subject: [PATCH 8/8] better default min versions for freebsd and netbsd Without this change, by default you get a failure when trying to cross compile for these targets. freebsd was error: undefined symbol: __libc_start1 netbsd was warning: invalid target NetBSD libc version: 9.4.0 error: unable to build NetBSD libc shared objects: InvalidTargetLibCVersion now they work by default --- lib/std/Target.zig | 4 +- test/tests.zig | 120 --------------------------------------------- 2 files changed, 2 insertions(+), 122 deletions(-) diff --git a/lib/std/Target.zig b/lib/std/Target.zig index 91deb9ddc1..c75e2b51fb 100644 --- a/lib/std/Target.zig +++ b/lib/std/Target.zig @@ -507,7 +507,7 @@ pub const Os = struct { .freebsd => .{ .semver = .{ .min = blk: { - const default_min: std.SemanticVersion = .{ .major = 13, .minor = 4, .patch = 0 }; + const default_min: std.SemanticVersion = .{ .major = 14, .minor = 0, .patch = 0 }; for (std.zig.target.available_libcs) |libc| { if (libc.arch != arch or libc.os != tag or libc.abi != abi) continue; @@ -525,7 +525,7 @@ pub const Os = struct { .netbsd => .{ .semver = .{ .min = blk: { - const default_min: std.SemanticVersion = .{ .major = 9, .minor = 4, .patch = 0 }; + const default_min: std.SemanticVersion = .{ .major = 10, .minor = 1, .patch = 0 }; for (std.zig.target.available_libcs) |libc| { if (libc.arch != arch or libc.os != tag or libc.abi != abi) continue; diff --git a/test/tests.zig b/test/tests.zig index 812681354c..bdc41e47bd 100644 --- a/test/tests.zig +++ b/test/tests.zig @@ -104,12 +104,6 @@ const test_targets = blk: { .target = .{ .cpu_arch = .aarch64, .os_tag = .freebsd, - // Remove this when we bump our baseline to 14.0.0. - .os_version_min = .{ .semver = .{ - .major = 14, - .minor = 0, - .patch = 0, - } }, .abi = .none, }, .link_libc = true, @@ -119,12 +113,6 @@ const test_targets = blk: { .target = .{ .cpu_arch = .arm, .os_tag = .freebsd, - // Remove this when we bump our baseline to 14.0.0. - .os_version_min = .{ .semver = .{ - .major = 14, - .minor = 0, - .patch = 0, - } }, .abi = .eabihf, }, .link_libc = true, @@ -136,12 +124,6 @@ const test_targets = blk: { .target = .{ .cpu_arch = .powerpc64, .os_tag = .freebsd, - // Remove this when we bump our baseline to 14.0.0. - .os_version_min = .{ .semver = .{ - .major = 14, - .minor = 0, - .patch = 0, - } }, .abi = .none, }, .link_libc = true, @@ -151,12 +133,6 @@ const test_targets = blk: { .target = .{ .cpu_arch = .powerpc64le, .os_tag = .freebsd, - // Remove this when we bump our baseline to 14.0.0. - .os_version_min = .{ .semver = .{ - .major = 14, - .minor = 0, - .patch = 0, - } }, .abi = .none, }, .link_libc = true, @@ -166,12 +142,6 @@ const test_targets = blk: { .target = .{ .cpu_arch = .riscv64, .os_tag = .freebsd, - // Remove this when we bump our baseline to 14.0.0. - .os_version_min = .{ .semver = .{ - .major = 14, - .minor = 0, - .patch = 0, - } }, .abi = .none, }, .link_libc = true, @@ -181,12 +151,6 @@ const test_targets = blk: { .target = .{ .cpu_arch = .x86_64, .os_tag = .freebsd, - // Remove this when we bump our baseline to 14.0.0. - .os_version_min = .{ .semver = .{ - .major = 14, - .minor = 0, - .patch = 0, - } }, .abi = .none, }, .link_libc = true, @@ -1236,12 +1200,6 @@ const test_targets = blk: { .target = .{ .cpu_arch = .aarch64, .os_tag = .netbsd, - // Remove this when we bump our baseline to 10.1.0. - .os_version_min = .{ .semver = .{ - .major = 10, - .minor = 1, - .patch = 0, - } }, .abi = .none, }, .link_libc = true, @@ -1251,12 +1209,6 @@ const test_targets = blk: { .target = .{ .cpu_arch = .aarch64_be, .os_tag = .netbsd, - // Remove this when we bump our baseline to 10.1.0. - .os_version_min = .{ .semver = .{ - .major = 10, - .minor = 1, - .patch = 0, - } }, .abi = .none, }, .link_libc = true, @@ -1266,12 +1218,6 @@ const test_targets = blk: { .target = .{ .cpu_arch = .arm, .os_tag = .netbsd, - // Remove this when we bump our baseline to 10.1.0. - .os_version_min = .{ .semver = .{ - .major = 10, - .minor = 1, - .patch = 0, - } }, .abi = .eabi, }, .link_libc = true, @@ -1280,12 +1226,6 @@ const test_targets = blk: { .target = .{ .cpu_arch = .arm, .os_tag = .netbsd, - // Remove this when we bump our baseline to 10.1.0. - .os_version_min = .{ .semver = .{ - .major = 10, - .minor = 1, - .patch = 0, - } }, .abi = .eabihf, }, .link_libc = true, @@ -1295,12 +1235,6 @@ const test_targets = blk: { .target = .{ .cpu_arch = .armeb, .os_tag = .netbsd, - // Remove this when we bump our baseline to 10.1.0. - .os_version_min = .{ .semver = .{ - .major = 10, - .minor = 1, - .patch = 0, - } }, .abi = .eabi, }, .link_libc = true, @@ -1309,12 +1243,6 @@ const test_targets = blk: { .target = .{ .cpu_arch = .armeb, .os_tag = .netbsd, - // Remove this when we bump our baseline to 10.1.0. - .os_version_min = .{ .semver = .{ - .major = 10, - .minor = 1, - .patch = 0, - } }, .abi = .eabihf, }, .link_libc = true, @@ -1324,12 +1252,6 @@ const test_targets = blk: { .target = .{ .cpu_arch = .mips, .os_tag = .netbsd, - // Remove this when we bump our baseline to 10.1.0. - .os_version_min = .{ .semver = .{ - .major = 10, - .minor = 1, - .patch = 0, - } }, .abi = .eabi, }, .link_libc = true, @@ -1338,12 +1260,6 @@ const test_targets = blk: { .target = .{ .cpu_arch = .mips, .os_tag = .netbsd, - // Remove this when we bump our baseline to 10.1.0. - .os_version_min = .{ .semver = .{ - .major = 10, - .minor = 1, - .patch = 0, - } }, .abi = .eabihf, }, .link_libc = true, @@ -1353,12 +1269,6 @@ const test_targets = blk: { .target = .{ .cpu_arch = .mipsel, .os_tag = .netbsd, - // Remove this when we bump our baseline to 10.1.0. - .os_version_min = .{ .semver = .{ - .major = 10, - .minor = 1, - .patch = 0, - } }, .abi = .eabi, }, .link_libc = true, @@ -1367,12 +1277,6 @@ const test_targets = blk: { .target = .{ .cpu_arch = .mipsel, .os_tag = .netbsd, - // Remove this when we bump our baseline to 10.1.0. - .os_version_min = .{ .semver = .{ - .major = 10, - .minor = 1, - .patch = 0, - } }, .abi = .eabihf, }, .link_libc = true, @@ -1382,12 +1286,6 @@ const test_targets = blk: { .target = .{ .cpu_arch = .powerpc, .os_tag = .netbsd, - // Remove this when we bump our baseline to 10.1.0. - .os_version_min = .{ .semver = .{ - .major = 10, - .minor = 1, - .patch = 0, - } }, .abi = .eabi, }, .link_libc = true, @@ -1396,12 +1294,6 @@ const test_targets = blk: { .target = .{ .cpu_arch = .powerpc, .os_tag = .netbsd, - // Remove this when we bump our baseline to 10.1.0. - .os_version_min = .{ .semver = .{ - .major = 10, - .minor = 1, - .patch = 0, - } }, .abi = .eabihf, }, .link_libc = true, @@ -1411,12 +1303,6 @@ const test_targets = blk: { .target = .{ .cpu_arch = .x86, .os_tag = .netbsd, - // Remove this when we bump our baseline to 10.1.0. - .os_version_min = .{ .semver = .{ - .major = 10, - .minor = 1, - .patch = 0, - } }, .abi = .none, }, .link_libc = true, @@ -1426,12 +1312,6 @@ const test_targets = blk: { .target = .{ .cpu_arch = .x86_64, .os_tag = .netbsd, - // Remove this when we bump our baseline to 10.1.0. - .os_version_min = .{ .semver = .{ - .major = 10, - .minor = 1, - .patch = 0, - } }, .abi = .none, }, .link_libc = true,