aboutsummaryrefslogtreecommitdiff
path: root/src/Compilation.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-08-01 23:48:14 -0700
committerAndrew Kelley <andrew@ziglang.org>2023-08-03 09:52:14 -0700
commit986a3d23abcbdb61fd733d2340d4872b6ee55dca (patch)
tree9efe038889e06038573ead7e3596802585dc977a /src/Compilation.zig
parente565ff305ae208b15058a462d348fde515b3e950 (diff)
downloadzig-986a3d23abcbdb61fd733d2340d4872b6ee55dca.tar.gz
zig-986a3d23abcbdb61fd733d2340d4872b6ee55dca.zip
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.
Diffstat (limited to 'src/Compilation.zig')
-rw-r--r--src/Compilation.zig4
1 files changed, 2 insertions, 2 deletions
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,