diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-05-17 07:19:15 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-17 07:19:15 -0700 |
| commit | c1add1e19ea35b4d96fbab317410276f757510ef (patch) | |
| tree | 9791032b09046f6d5b785cd643439b266737cab4 /lib/std/Build/Cache.zig | |
| parent | 5b06daf52bdeaf18b40909ef878e8b19b3d14019 (diff) | |
| parent | 728ce2d7c18e23ca6c36d86f4ee1ea4ce3ac81e2 (diff) | |
| download | zig-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.zig | 4 |
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))), |
