authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-04-30 14:49:23-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-05-25 18:54:35-07:00
log1dc82c13280ae327faf9448dcaf69960f5f5cad4
tree48b9a04f41010713a44966272fa051eadcc6ff33
parent7819e4dea7d1bd75ee1bbb8d76bb8a8ee7672962

configurer: remove Cache


3 files changed, 6 insertions(+), 15 deletions(-)

BRANCH_TODO+6-2
......@@ -1,4 +1,3 @@
1* remove Cache from configurer
21* implement the build options
32* finish migrating the rest of the build steps
43* inspect b4ffb402c082605c4b324e88120306fc8fb3cf32 diff and apply changes as needed (merge conflict)
......@@ -29,7 +28,8 @@
2928
3029## Release Notes
3130
32run args are all together now, not observable in configure phase whether run args are provided.
31In the Run step, passthru args are all together now, not observable in
32configure phase whether run args are provided.
3333
3434```zig
3535if (b.args) |args| {
......@@ -42,3 +42,7 @@ if (b.args) |args| {
4242```zig
4343run_cmd.addPassthruArgs();
4444```
45
46This removes a capability from build scripts since they can no longer observe
47those arguments. In exchange, it means that when changing those arguments,
48build scripts need not be rebuilt from source.
lib/compiler/configurer.zig-12
......@@ -73,12 +73,6 @@ pub fn main(init: process.Init.Minimal) !void {
7373 var graph: std.Build.Graph = .{
7474 .io = io,
7575 .arena = arena,
76 .cache = .{
77 .io = io,
78 .gpa = arena,
79 .manifest_dir = try local_cache_directory.handle.createDirPathOpen(io, "h", .{}),
80 .cwd = try process.currentPathAlloc(io, arena),
81 },
8276 .zig_exe = zig_exe,
8377 .environ_map = try init.environ.createMap(arena),
8478 .global_cache_root = global_cache_directory,
......@@ -102,12 +96,6 @@ pub fn main(init: process.Init.Minimal) !void {
10296 assert(try graph.wip_configuration.addString("") == .empty);
10397 assert(try graph.wip_configuration.addString("root") == .root);
10498
105 graph.cache.addPrefix(.{ .path = null, .handle = cwd });
106 graph.cache.addPrefix(build_root_directory);
107 graph.cache.addPrefix(local_cache_directory);
108 graph.cache.addPrefix(global_cache_directory);
109 graph.cache.hash.addBytes(builtin.zig_version_string);
110
11199 const builder = try std.Build.create(
112100 &graph,
113101 build_root_directory,
lib/std/Build.zig-1
......@@ -83,7 +83,6 @@ pub const Graph = struct {
8383 arena: Allocator,
8484 system_integration_options: std.StringArrayHashMapUnmanaged(SystemLibraryMode) = .empty,
8585 system_package_mode: bool = false,
86 cache: Cache,
8786 zig_exe: []const u8,
8887 environ_map: process.Environ.Map,
8988 global_cache_root: Cache.Directory,