From 986a3d23abcbdb61fd733d2340d4872b6ee55dca Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 1 Aug 2023 23:48:14 -0700 Subject: frontend: make SystemLib.path optional This can be null in two cases right now: 1. Windows DLLs that zig ships such as advapi32. 2. extern "foo" fn declarations where we find out about libraries too late TODO: make this non-optional and resolve those two cases somehow. --- src/Compilation.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Compilation.zig') diff --git a/src/Compilation.zig b/src/Compilation.zig index 0c8b3c5248..91b31c6004 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -1728,7 +1728,7 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation { try comp.bin_file.options.system_libs.put(comp.gpa, name, .{ .needed = false, .weak = false, - .path = name, + .path = null, }); } } @@ -5621,7 +5621,7 @@ pub fn addLinkLib(comp: *Compilation, lib_name: []const u8) !void { gop.value_ptr.* = .{ .needed = true, .weak = false, - .path = undefined, + .path = null, }; try comp.work_queue.writeItem(.{ .windows_import_lib = comp.bin_file.options.system_libs.count() - 1, -- cgit v1.2.3