authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-05-25 13:54:20-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-05-25 18:54:36-07:00
logbd1b47733bc7565187d4a7c806afec03401bbf25
treef05a7476f335912ed62a92972136e2aae0cc5b4c
parent1aa65d094ec737a140d7ab60e1b2af62144edd6a

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).

3 files changed, 1 insertions(+), 12 deletions(-)

lib/compiler/Maker/ScannedConfig.zig-1
......@@ -342,7 +342,6 @@ pub fn printUsage(sc: *const ScannedConfig, graph: *Graph, w: *Writer) !void {
342342 \\ --cache-dir [path] Override path to local Zig cache directory
343343 \\ --global-cache-dir [path] Override path to global Zig cache directory
344344 \\ --zig-lib-dir [arg] Override path to Zig lib directory
345 \\ --build-runner [file] Override path to build runner
346345 \\ --seed [integer] For shuffling dependency traversal order (default: random)
347346 \\ --cache-poison[=mode] Override configuration caching behavior
348347 \\ pure (default) Avoid false positive cache hits
lib/std/zig.zig-1
......@@ -756,7 +756,6 @@ pub const EnvVar = enum {
756756 ZIG_LOCAL_PKG_DIR,
757757 ZIG_LIB_DIR,
758758 ZIG_LIBC,
759 ZIG_BUILD_RUNNER,
760759 ZIG_BUILD_ERROR_STYLE,
761760 ZIG_BUILD_MULTILINE_ERRORS,
762761 ZIG_VERBOSE_LINK,
src/main.zig+1-10
......@@ -4944,7 +4944,6 @@ fn cmdBuild(
49444944 var override_global_cache_dir: ?[]const u8 = EnvVar.ZIG_GLOBAL_CACHE_DIR.get(environ_map);
49454945 var override_local_cache_dir: ?[]const u8 = EnvVar.ZIG_LOCAL_CACHE_DIR.get(environ_map);
49464946 var override_pkg_dir: ?[]const u8 = EnvVar.ZIG_LOCAL_PKG_DIR.get(environ_map);
4947 var override_make_runner: ?[]const u8 = EnvVar.ZIG_BUILD_RUNNER.get(environ_map);
49484947 var maker_optimize_mode: std.builtin.OptimizeMode = if (EnvVar.ZIG_DEBUG_CMD.isSet(environ_map))
49494948 .Debug
49504949 else
......@@ -5074,11 +5073,6 @@ fn cmdBuild(
50745073 i += 1;
50755074 override_lib_dir = args[i];
50765075 continue;
5077 } else if (mem.eql(u8, arg, "--build-runner")) {
5078 if (i + 1 >= args.len) fatal("expected argument after '{s}'", .{arg});
5079 i += 1;
5080 override_make_runner = args[i];
5081 continue;
50825076 } else if (mem.eql(u8, arg, "--cache-dir")) {
50835077 if (i + 1 >= args.len) fatal("expected argument after '{s}'", .{arg});
50845078 i += 1;
......@@ -5365,10 +5359,7 @@ fn cmdBuild(
53655359 // We want to release all the locks before executing the child process, so we make a nice
53665360 // big block here to ensure the cleanup gets run when we extract out our argv.
53675361 {
5368 const main_mod_paths: Package.Module.CreateOptions.Paths = if (override_make_runner) |runner| .{
5369 .root = try .fromUnresolved(arena, dirs, &.{fs.path.dirname(runner) orelse "."}),
5370 .root_src_path = fs.path.basename(runner),
5371 } else .{
5362 const main_mod_paths: Package.Module.CreateOptions.Paths = .{
53725363 .root = try .fromRoot(arena, dirs, .zig_lib, "compiler"),
53735364 .root_src_path = "configurer.zig",
53745365 };