aboutsummaryrefslogtreecommitdiff
path: root/src/Cache.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-11-20 17:23:44 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-11-20 17:23:44 -0700
commit4e5a88b28882eda156a46ecc7f70887a7bc0b49b (patch)
tree1ccdc54fdb432ff72692e9f10f4f0640ef6869cd /src/Cache.zig
parenta699d678b2c81dcf333a4f4bb84676836849a618 (diff)
downloadzig-4e5a88b28882eda156a46ecc7f70887a7bc0b49b.tar.gz
zig-4e5a88b28882eda156a46ecc7f70887a7bc0b49b.zip
stage2: default dynamic libraries to be linked as needed
After this change, the default for dynamic libraries (`-l` or `--library`) is to only link them if they end up being actually used. With the Zig CLI, the new options `-needed-l` or `--needed-library` can be used to force link against a dynamic library. With `zig cc`, this behavior can be overridden with `-Wl,--no-as-needed` (and restored with `-Wl,--as-needed`). Closes #10164
Diffstat (limited to 'src/Cache.zig')
-rw-r--r--src/Cache.zig8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/Cache.zig b/src/Cache.zig
index 7d3bfdc3f2..3ae6c0d5d5 100644
--- a/src/Cache.zig
+++ b/src/Cache.zig
@@ -90,14 +90,6 @@ pub const HashHelper = struct {
for (list_of_bytes) |bytes| hh.addBytes(bytes);
}
- pub fn addStringSet(hh: *HashHelper, hm: std.StringArrayHashMapUnmanaged(void)) void {
- const keys = hm.keys();
- hh.add(keys.len);
- for (keys) |key| {
- hh.addBytes(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)) {