authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-12 14:35:23+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-12 14:35:23+02:00
log7a7b944ef8ddc87a89fc4057187213c68a200fb2
tree74e7f876e682174d509816ad67b67ccc80c05415
parent05671ced91b539c778e663523cc541402a923af5
signature Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.Target: remove hermit OS tag

Hermit is a unikernel with no stable syscall ABI; you must link its syscall library statically to perform syscalls. Due to the way the project's build system works, that means using Rust/Cargo. As such, it makes essentially zero sense for Zig to support this target.

7 files changed, 0 insertions(+), 29 deletions(-)

lib/compiler/aro/aro/Target.zig-1
......@@ -1302,7 +1302,6 @@ pub fn toLLVMTriple(target: *const Target, buf: []u8) []const u8 {
13021302 .freestanding => "unknown",
13031303 .fuchsia => "fuchsia",
13041304 .haiku => "haiku",
1305 .hermit => "hermit",
13061305 .hurd => "hurd",
13071306 .illumos => "illumos",
13081307 .ios, .maccatalyst => "ios",
lib/std/Build/Configuration.zig-1
......@@ -2381,7 +2381,6 @@ pub const TargetQuery = struct {
23812381 other,
23822382 contiki,
23832383 fuchsia,
2384 hermit,
23852384 managarm,
23862385 haiku,
23872386 hurd,
lib/std/Target.zig-13
......@@ -21,7 +21,6 @@ pub const Os = struct {
2121
2222 contiki,
2323 fuchsia,
24 hermit,
2524 managarm,
2625
2726 haiku,
......@@ -180,7 +179,6 @@ pub const Os = struct {
180179
181180 .contiki,
182181 .fuchsia,
183 .hermit,
184182
185183 .rtems,
186184
......@@ -431,12 +429,6 @@ pub const Os = struct {
431429 .max = .{ .major = 30, .minor = 0, .patch = 0 },
432430 },
433431 },
434 .hermit => .{
435 .semver = .{
436 .min = .{ .major = 0, .minor = 8, .patch = 0 },
437 .max = .{ .major = 0, .minor = 13, .patch = 2 },
438 },
439 },
440432
441433 .hurd => .{
442434 .hurd = .{
......@@ -955,7 +947,6 @@ pub const Abi = enum {
955947 .ashetos => .eabi,
956948
957949 .contiki,
958 .hermit,
959950 .illumos,
960951 .managarm,
961952 .plan9,
......@@ -2344,7 +2335,6 @@ pub fn requiresLibC(target: *const Target) bool {
23442335 .mesa3d,
23452336 .contiki,
23462337 .amdpal,
2347 .hermit,
23482338 .hurd,
23492339 .wasi,
23502340 .uefi,
......@@ -2495,7 +2485,6 @@ pub const DynamicLinker = struct {
24952485 .other,
24962486
24972487 .contiki,
2498 .hermit,
24992488 .managarm, // Needs to be double-checked.
25002489
25012490 .plan9,
......@@ -2929,7 +2918,6 @@ pub const DynamicLinker = struct {
29292918 .other,
29302919
29312920 .contiki,
2932 .hermit,
29332921
29342922 .plan9,
29352923 .rtems,
......@@ -3318,7 +3306,6 @@ pub fn cTypeBitSize(target: *const Target, c_type: CType) ?u16 {
33183306 },
33193307
33203308 .fuchsia,
3321 .hermit,
33223309
33233310 .haiku,
33243311 .hurd,
lib/std/c.zig-9
......@@ -8024,9 +8024,6 @@ pub const pthread_mutex_t = switch (native_os) {
80248024 .freebsd, .dragonfly, .openbsd => extern struct {
80258025 inner: ?*anyopaque = null,
80268026 },
8027 .hermit => extern struct {
8028 ptr: usize = maxInt(usize),
8029 },
80308027 .netbsd => extern struct {
80318028 magic: u32 = 0x33330003,
80328029 errorcheck: padded_pthread_spin_t = 0,
......@@ -8080,9 +8077,6 @@ pub const pthread_cond_t = switch (native_os) {
80808077 .freebsd, .dragonfly, .openbsd => extern struct {
80818078 inner: ?*anyopaque = null,
80828079 },
8083 .hermit => extern struct {
8084 ptr: usize = maxInt(usize),
8085 },
80868080 .netbsd => extern struct {
80878081 magic: u32 = 0x55550005,
80888082 lock: pthread_spin_t = 0,
......@@ -8138,9 +8132,6 @@ pub const pthread_rwlock_t = switch (native_os) {
81388132 .freebsd, .dragonfly, .openbsd => extern struct {
81398133 ptr: ?*anyopaque = null,
81408134 },
8141 .hermit => extern struct {
8142 ptr: usize = maxInt(usize),
8143 },
81448135 .netbsd => extern struct {
81458136 magic: c_uint = 0x99990009,
81468137 interlock: switch (builtin.cpu.arch) {
lib/std/zig/llvm/Builder.zig-1
......@@ -269,7 +269,6 @@ pub fn tripleForTarget(allocator: Allocator, target: *const std.Target) ![]const
269269 .ps5 => "ps5",
270270 .mesa3d => "mesa3d",
271271 .amdpal => "amdpal",
272 .hermit => "hermit",
273272 .hurd => "hurd",
274273 .wasi => "wasi",
275274 .emscripten => "emscripten",
src/link/Elf.zig-1
......@@ -1547,7 +1547,6 @@ pub fn writeElfHeader(self: *Elf) !void {
15471547 .msp430 => .STANDALONE,
15481548 else => switch (target.os.tag) {
15491549 .freebsd, .ps4 => .FREEBSD,
1550 .hermit => .STANDALONE,
15511550 .illumos => .SOLARIS,
15521551 .openbsd => .OPENBSD,
15531552 else => .NONE,
test/llvm_targets.zig-3
......@@ -7,7 +7,6 @@ const targets = [_]std.Target.Query{
77 .{ .cpu_arch = .aarch64, .os_tag = .freestanding, .abi = .none },
88 .{ .cpu_arch = .aarch64, .os_tag = .fuchsia, .abi = .none },
99 .{ .cpu_arch = .aarch64, .os_tag = .haiku, .abi = .none },
10 .{ .cpu_arch = .aarch64, .os_tag = .hermit, .abi = .none },
1110 .{ .cpu_arch = .aarch64, .os_tag = .hurd, .abi = .gnu },
1211 .{ .cpu_arch = .aarch64, .os_tag = .ios, .abi = .none },
1312 .{ .cpu_arch = .aarch64, .os_tag = .ios, .abi = .simulator },
......@@ -230,7 +229,6 @@ const targets = [_]std.Target.Query{
230229 .{ .cpu_arch = .riscv64, .os_tag = .freestanding, .abi = .none },
231230 .{ .cpu_arch = .riscv64, .os_tag = .fuchsia, .abi = .none },
232231 .{ .cpu_arch = .riscv64, .os_tag = .haiku, .abi = .none },
233 .{ .cpu_arch = .riscv64, .os_tag = .hermit, .abi = .none },
234232 .{ .cpu_arch = .riscv64, .os_tag = .hurd, .abi = .gnu },
235233 .{ .cpu_arch = .riscv64, .os_tag = .linux, .abi = .android },
236234 .{ .cpu_arch = .riscv64, .os_tag = .linux, .abi = .gnu },
......@@ -326,7 +324,6 @@ const targets = [_]std.Target.Query{
326324 .{ .cpu_arch = .x86_64, .os_tag = .dragonfly, .abi = .none },
327325 .{ .cpu_arch = .x86_64, .os_tag = .driverkit, .abi = .none },
328326 .{ .cpu_arch = .x86_64, .os_tag = .haiku, .abi = .none },
329 .{ .cpu_arch = .x86_64, .os_tag = .hermit, .abi = .none },
330327 .{ .cpu_arch = .x86_64, .os_tag = .hurd, .abi = .gnu },
331328 .{ .cpu_arch = .x86_64, .os_tag = .illumos, .abi = .none },
332329 .{ .cpu_arch = .x86_64, .os_tag = .linux, .abi = .android },