From a69438f95cca0af4f3cc81237777e565c6b07efc Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 23 Jun 2026 23:41:17 -0700 Subject: [PATCH] Maker: only build configurer on cache miss This is now possible thanks to putting the configurer source files also into the configuration cache manifest. --- lib/compiler/Maker.zig | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/compiler/Maker.zig b/lib/compiler/Maker.zig index 74a7f4d4a37b6b244c27b1e876cfb83c2715bf6c..fe27a158800a7988690c7611a27c0f00a52e01fa 100644 --- a/lib/compiler/Maker.zig +++ b/lib/compiler/Maker.zig @@ -939,6 +939,20 @@ pub fn main(init: process.Init.Minimal) !void { const compile_prog_node = main_progress_node.start("Compile Configure Script", 0); defer compile_prog_node.end(); + switch (cache_poison) { + .pure, .disallowed, .ignored => if (try config_man.hit()) { + const digest = config_man.final(); + break :cp .{ + .{ + .root_dir = graph.local_cache_root, + .sub_path = try allocPrint(arena, "c/{s}", .{&digest}), + }, + false, + }; + }, + .poisoned => {}, // Don't bother checking for cache hit. + } + const configure_exe_path: Path = if (std.zig.buildExeSubprocess(gpa, io, .{ .argv = build_configurer_argv.items, .cache_root = graph.local_cache_root, @@ -957,20 +971,6 @@ pub fn main(init: process.Init.Minimal) !void { defer gpa.free(configure_exe_path.sub_path); configure_argv.items[0] = try configure_exe_path.toString(arena); - - switch (cache_poison) { - .pure, .disallowed, .ignored => if (try config_man.hit()) { - const digest = config_man.final(); - break :cp .{ - .{ - .root_dir = graph.local_cache_root, - .sub_path = try allocPrint(arena, "c/{s}", .{&digest}), - }, - false, - }; - }, - .poisoned => {}, // Don't bother checking for cache hit. - } } if (!process.can_spawn) { -- 2.54.0