From ec13e8eaaafc34193f245e593333f512681f168f Mon Sep 17 00:00:00 2001 From: Sivecano Date: Mon, 29 Dec 2025 05:55:03 +0100 Subject: [PATCH] emit error and crash when trying to use the broken -femit-h option (#30229) I know the real solution would be to fix this. But this is still way better than unexplained bugs. I hope this is the correct way to do this. I've tested it and it seems to work as advertised. This may not fix it in the build system... but yk, better than nothing. Reviewed-on: https://codeberg.org/ziglang/zig/pulls/30229 Reviewed-by: Andrew Kelley Co-authored-by: Sivecano Co-committed-by: Sivecano --- src/main.zig | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.zig b/src/main.zig index d07580636cbb82b91f681eb8c42ccb11d3fbc350..cf1fc2793dbe38530037011dc407fc9adf7bfcf6 100644 --- a/src/main.zig +++ b/src/main.zig @@ -1503,6 +1503,7 @@ fn buildOutputType( } else if (mem.eql(u8, arg, "-fno-emit-bin")) { emit_bin = .no; } else if (mem.eql(u8, arg, "-femit-h")) { + fatal("-femit-h is currently broken, see https://github.com/ziglang/zig/issues/9698", .{}); emit_h = .yes_default_path; } else if (mem.cutPrefix(u8, arg, "-femit-h=")) |rest| { emit_h = .{ .yes = rest }; -- 2.54.0