commit 8bc09132121d751760b332a30a82c3dfa343a48a (tree)
parent e436d9c4ad623d8facefb8e1637b26e63e900277
Author: Andrew Kelley <andrew@ziglang.org>
Date: Tue, 17 Mar 2026 23:02:59 -0700
compiler: fix compilation errors
Diffstat:
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/lib/std/Build/Configuration.zig b/lib/std/Build/Configuration.zig
@@ -1419,6 +1419,13 @@ pub const Path = extern struct {
global_cache,
build_root,
};
+
+ pub fn toCachePath(path: Path, c: *const Configuration, arena: Allocator) std.Build.Cache.Path {
+ _ = c;
+ _ = arena;
+ _ = path;
+ @panic("TODO");
+ }
};
pub const InstallDestDir = enum(u32) {
diff --git a/src/Compilation.zig b/src/Compilation.zig
@@ -1747,9 +1747,13 @@ pub const CreateOptions = struct {
.no => return null,
.yes_cache => {
assert(opts.cache_mode != .none);
+ const target = &opts.root_mod.resolved_target.result;
return try ea.cacheName(arena, .{
.root_name = opts.root_name,
- .target = &opts.root_mod.resolved_target.result,
+ .cpu_arch = target.cpu.arch,
+ .os_tag = target.os.tag,
+ .ofmt = target.ofmt,
+ .abi = target.abi,
.output_mode = opts.config.output_mode,
.link_mode = opts.config.link_mode,
.version = opts.version,
diff --git a/src/main.zig b/src/main.zig
@@ -3380,7 +3380,10 @@ fn buildOutputType(
.pch => try std.fmt.allocPrint(arena, "{s}.pch", .{root_name}),
else => try std.zig.binNameAlloc(arena, .{
.root_name = root_name,
- .target = target,
+ .cpu_arch = target.cpu.arch,
+ .os_tag = target.os.tag,
+ .ofmt = target.ofmt,
+ .abi = target.abi,
.output_mode = create_module.resolved_options.output_mode,
.link_mode = create_module.resolved_options.link_mode,
.version = optional_version,