From 9b6dd7ee5c4137942f7fbbdd27d8e06f6ce7c7b1 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sat, 23 May 2026 14:30:07 -0700 Subject: [PATCH] zig build CLI: change --debug-maker to --maker-opt=[mode] the --debug- prefixed args are reserved for compiler debugging flags. --- ci/x86_64-linux-debug-llvm.sh | 2 +- lib/compiler/Maker/ScannedConfig.zig | 2 +- src/main.zig | 5 +---- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/ci/x86_64-linux-debug-llvm.sh b/ci/x86_64-linux-debug-llvm.sh index ed24f7e460eb4f1a662f7d0d3ab4e6d6fe5e3c38..d4cbf3ce3cdd7b621e5031351257c0066d6eeedd 100755 --- a/ci/x86_64-linux-debug-llvm.sh +++ b/ci/x86_64-linux-debug-llvm.sh @@ -49,7 +49,7 @@ stage3-debug/bin/zig build \ -Dno-lib stage3-debug/bin/zig build test docs \ - --debug-maker \ + --maker-opt=Debug \ --maxrss ${ZSF_MAX_RSS:-0} \ -Dlldb=$HOME/deps/lldb-zig/Debug-e0a42bb34/bin/lldb \ -Dlibc-test-path=$HOME/deps/libc-test-f2bac77 \ diff --git a/lib/compiler/Maker/ScannedConfig.zig b/lib/compiler/Maker/ScannedConfig.zig index 379b8b209c83243a20769383f596e1f964b67e99..7bcdec5f64b25f20a43f7d36e7817989bfb57548 100644 --- a/lib/compiler/Maker/ScannedConfig.zig +++ b/lib/compiler/Maker/ScannedConfig.zig @@ -359,7 +359,7 @@ pub fn printUsage(sc: *const ScannedConfig, graph: *Graph, w: *Writer) !void { \\ none (default) No build ID \\ --debug-log [scope] Enable debugging the compiler \\ --debug-pkg-config Fail if unknown pkg-config flags encountered - \\ --debug-maker[=mode] Change maker executable optimization mode + \\ --maker-opt=[mode] Change maker executable optimization mode (default: ReleaseSafe) \\ --verbose-link Enable compiler debug output for linking \\ --verbose-air Enable compiler debug output for Zig AIR \\ --verbose-llvm-ir Enable compiler debug output for LLVM IR diff --git a/src/main.zig b/src/main.zig index 5db4c1c95ff50d2f3faf1244801975c41f3dd3b4..a79ee7150f240e37bb3740e31c92843c52991da8 100644 --- a/src/main.zig +++ b/src/main.zig @@ -5116,10 +5116,7 @@ fn cmdBuild( }; } else if (mem.eql(u8, arg, "-fno-reference-trace")) { reference_trace = null; - } else if (mem.eql(u8, arg, "--debug-maker")) { - maker_optimize_mode = .Debug; - continue; - } else if (mem.cutPrefix(u8, arg, "--debug-maker=")) |rest| { + } else if (mem.cutPrefix(u8, arg, "--maker-opt=")) |rest| { maker_optimize_mode = parseOptimizeMode(rest); continue; } else if (mem.eql(u8, arg, "--debug-log")) { -- 2.54.0