authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-06-23 23:41:17-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-06-29 23:50:19-07:00
loga69438f95cca0af4f3cc81237777e565c6b07efc
tree05f77038f082b02a3521c3e6efb3baefa00ad912
parentc8dad46ced6afcf08dfac2b8d4ae0c3a062983be

Maker: only build configurer on cache miss

This is now possible thanks to putting the configurer source files also into the configuration cache manifest.

1 files changed, 14 insertions(+), 14 deletions(-)

lib/compiler/Maker.zig+14-14
......@@ -939,6 +939,20 @@ pub fn main(init: process.Init.Minimal) !void {
939939 const compile_prog_node = main_progress_node.start("Compile Configure Script", 0);
940940 defer compile_prog_node.end();
941941
942 switch (cache_poison) {
943 .pure, .disallowed, .ignored => if (try config_man.hit()) {
944 const digest = config_man.final();
945 break :cp .{
946 .{
947 .root_dir = graph.local_cache_root,
948 .sub_path = try allocPrint(arena, "c/{s}", .{&digest}),
949 },
950 false,
951 };
952 },
953 .poisoned => {}, // Don't bother checking for cache hit.
954 }
955
942956 const configure_exe_path: Path = if (std.zig.buildExeSubprocess(gpa, io, .{
943957 .argv = build_configurer_argv.items,
944958 .cache_root = graph.local_cache_root,
......@@ -957,20 +971,6 @@ pub fn main(init: process.Init.Minimal) !void {
957971 defer gpa.free(configure_exe_path.sub_path);
958972
959973 configure_argv.items[0] = try configure_exe_path.toString(arena);
960
961 switch (cache_poison) {
962 .pure, .disallowed, .ignored => if (try config_man.hit()) {
963 const digest = config_man.final();
964 break :cp .{
965 .{
966 .root_dir = graph.local_cache_root,
967 .sub_path = try allocPrint(arena, "c/{s}", .{&digest}),
968 },
969 false,
970 };
971 },
972 .poisoned => {}, // Don't bother checking for cache hit.
973 }
974974 }
975975
976976 if (!process.can_spawn) {