aboutsummaryrefslogtreecommitdiff
path: root/src/Cache.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-09-28 00:06:06 -0700
committerAndrew Kelley <andrew@ziglang.org>2020-09-28 00:06:06 -0700
commit91a73a177bc20fa0219dbb6c3cf3dda1c2a465db (patch)
tree5f391418951620a1f28e8a8fccddbb8e33aed8f6 /src/Cache.zig
parenta9082b4ec51debdbffc20b56e9b37cb82dd04750 (diff)
downloadzig-91a73a177bc20fa0219dbb6c3cf3dda1c2a465db.tar.gz
zig-91a73a177bc20fa0219dbb6c3cf3dda1c2a465db.zip
stage2: building mingw-w64 and COFF LDD linking
still TODO is the task of creating import .lib files for DLLs on the fly both for -lfoo and for e.g. `extern "kernel32"`
Diffstat (limited to 'src/Cache.zig')
-rw-r--r--src/Cache.zig8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Cache.zig b/src/Cache.zig
index cfcbc3e76a..425c6407a3 100644
--- a/src/Cache.zig
+++ b/src/Cache.zig
@@ -76,6 +76,14 @@ pub const HashHelper = struct {
for (list_of_bytes) |bytes| hh.addBytes(bytes);
}
+ pub fn addStringSet(hh: *HashHelper, hm: std.StringArrayHashMapUnmanaged(void)) void {
+ const entries = hm.items();
+ hh.add(entries.len);
+ for (entries) |entry| {
+ hh.addBytes(entry.key);
+ }
+ }
+
/// Convert the input value into bytes and record it as a dependency of the process being cached.
pub fn add(hh: *HashHelper, x: anytype) void {
switch (@TypeOf(x)) {