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