aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Build/Cache.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-05-17 07:19:15 -0700
committerGitHub <noreply@github.com>2023-05-17 07:19:15 -0700
commitc1add1e19ea35b4d96fbab317410276f757510ef (patch)
tree9791032b09046f6d5b785cd643439b266737cab4 /lib/std/Build/Cache.zig
parent5b06daf52bdeaf18b40909ef878e8b19b3d14019 (diff)
parent728ce2d7c18e23ca6c36d86f4ee1ea4ce3ac81e2 (diff)
downloadzig-c1add1e19ea35b4d96fbab317410276f757510ef.tar.gz
zig-c1add1e19ea35b4d96fbab317410276f757510ef.zip
Merge pull request #15459 from motiejus/build-id-full
stage2: implement `--build-id` styles
Diffstat (limited to 'lib/std/Build/Cache.zig')
-rw-r--r--lib/std/Build/Cache.zig4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/std/Build/Cache.zig b/lib/std/Build/Cache.zig
index 17429c0370..e991aff5b5 100644
--- a/lib/std/Build/Cache.zig
+++ b/lib/std/Build/Cache.zig
@@ -235,6 +235,10 @@ pub const HashHelper = struct {
.none => {},
}
},
+ std.Build.Step.Compile.BuildId => switch (x) {
+ .none, .fast, .uuid, .sha1, .md5 => hh.add(std.meta.activeTag(x)),
+ .hexstring => |hex_string| hh.addBytes(hex_string.toSlice()),
+ },
else => switch (@typeInfo(@TypeOf(x))) {
.Bool, .Int, .Enum, .Array => hh.addBytes(mem.asBytes(&x)),
else => @compileError("unable to hash type " ++ @typeName(@TypeOf(x))),