zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit bd1b47733bc7565187d4a7c806afec03401bbf25 (tree)
parent 1aa65d094ec737a140d7ab60e1b2af62144edd6a
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Mon, 25 May 2026 13:54:20 -0700

zig build: remove --build-runner CLI parameter

There is no concept of a "build runner" any more; it has been split in two:
configurer and maker.

Users of this feature will likely want to no longer override any logic, and
instead consume the configuration file produced by configurer.

If overriding one or the other of these is desired, the feature will need to be
re-introduced (as --override-maker or --override-configurer).

Diffstat:
Mlib/compiler/Maker/ScannedConfig.zig | 1-
Mlib/std/zig.zig | 1-
Msrc/main.zig | 11+----------
3 files changed, 1 insertion(+), 12 deletions(-)

diff --git a/lib/compiler/Maker/ScannedConfig.zig b/lib/compiler/Maker/ScannedConfig.zig @@ -342,7 +342,6 @@ pub fn printUsage(sc: *const ScannedConfig, graph: *Graph, w: *Writer) !void { \\ --cache-dir [path] Override path to local Zig cache directory \\ --global-cache-dir [path] Override path to global Zig cache directory \\ --zig-lib-dir [arg] Override path to Zig lib directory - \\ --build-runner [file] Override path to build runner \\ --seed [integer] For shuffling dependency traversal order (default: random) \\ --cache-poison[=mode] Override configuration caching behavior \\ pure (default) Avoid false positive cache hits diff --git a/lib/std/zig.zig b/lib/std/zig.zig @@ -756,7 +756,6 @@ pub const EnvVar = enum { ZIG_LOCAL_PKG_DIR, ZIG_LIB_DIR, ZIG_LIBC, - ZIG_BUILD_RUNNER, ZIG_BUILD_ERROR_STYLE, ZIG_BUILD_MULTILINE_ERRORS, ZIG_VERBOSE_LINK, diff --git a/src/main.zig b/src/main.zig @@ -4944,7 +4944,6 @@ fn cmdBuild( var override_global_cache_dir: ?[]const u8 = EnvVar.ZIG_GLOBAL_CACHE_DIR.get(environ_map); var override_local_cache_dir: ?[]const u8 = EnvVar.ZIG_LOCAL_CACHE_DIR.get(environ_map); var override_pkg_dir: ?[]const u8 = EnvVar.ZIG_LOCAL_PKG_DIR.get(environ_map); - var override_make_runner: ?[]const u8 = EnvVar.ZIG_BUILD_RUNNER.get(environ_map); var maker_optimize_mode: std.builtin.OptimizeMode = if (EnvVar.ZIG_DEBUG_CMD.isSet(environ_map)) .Debug else @@ -5074,11 +5073,6 @@ fn cmdBuild( i += 1; override_lib_dir = args[i]; continue; - } else if (mem.eql(u8, arg, "--build-runner")) { - if (i + 1 >= args.len) fatal("expected argument after '{s}'", .{arg}); - i += 1; - override_make_runner = args[i]; - continue; } else if (mem.eql(u8, arg, "--cache-dir")) { if (i + 1 >= args.len) fatal("expected argument after '{s}'", .{arg}); i += 1; @@ -5365,10 +5359,7 @@ fn cmdBuild( // We want to release all the locks before executing the child process, so we make a nice // big block here to ensure the cleanup gets run when we extract out our argv. { - const main_mod_paths: Package.Module.CreateOptions.Paths = if (override_make_runner) |runner| .{ - .root = try .fromUnresolved(arena, dirs, &.{fs.path.dirname(runner) orelse "."}), - .root_src_path = fs.path.basename(runner), - } else .{ + const main_mod_paths: Package.Module.CreateOptions.Paths = .{ .root = try .fromRoot(arena, dirs, .zig_lib, "compiler"), .root_src_path = "configurer.zig", };