authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2022-06-28 20:52:31+02:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2022-06-28 20:52:31+02:00
logc02dc17618637139a5fc704c5c42723984398665
treee7c90b2ac4b06cdbe6725fd56957327d430e6af4
parent9e8298b864e076221ca9c487412209d8a08c43b2

link: cache weak libraries


1 files changed, 2 insertions(+), 0 deletions(-)

src/link.zig+2
...@@ -19,6 +19,7 @@ const Package = @import("Package.zig");...@@ -19,6 +19,7 @@ const Package = @import("Package.zig");
19const Type = @import("type.zig").Type;19const Type = @import("type.zig").Type;
20const TypedValue = @import("TypedValue.zig");20const TypedValue = @import("TypedValue.zig");
2121
22/// When adding a new field, remember to update `hashAddSystemLibs`.
22pub const SystemLib = struct {23pub const SystemLib = struct {
23 needed: bool = false,24 needed: bool = false,
24 weak: bool = false,25 weak: bool = false,
...@@ -35,6 +36,7 @@ pub fn hashAddSystemLibs(...@@ -35,6 +36,7 @@ pub fn hashAddSystemLibs(
35 hh.addListOfBytes(keys);36 hh.addListOfBytes(keys);
36 for (hm.values()) |value| {37 for (hm.values()) |value| {
37 hh.add(value.needed);38 hh.add(value.needed);
39 hh.add(value.weak);
38 }40 }
39}41}
4042