mirror of
https://github.com/ziglang/zig.git
synced 2026-02-04 13:43:46 +00:00
link.Elf: report file not found error
This commit is contained in:
parent
cc56577edf
commit
3f4df85299
@ -1415,9 +1415,12 @@ pub fn flushModule(self: *Elf, comp: *Compilation, prog_node: *std.Progress.Node
|
||||
}
|
||||
|
||||
for (system_libs.items) |lib| {
|
||||
const in_file = try std.fs.cwd().openFile(lib.path, .{});
|
||||
defer in_file.close();
|
||||
var parse_ctx: ParseErrorCtx = .{ .detected_cpu_arch = undefined };
|
||||
const in_file = std.fs.cwd().openFile(lib.path, .{}) catch |err| {
|
||||
try self.handleAndReportParseError(lib.path, err, &parse_ctx);
|
||||
continue;
|
||||
};
|
||||
defer in_file.close();
|
||||
self.parseLibrary(in_file, lib, false, &parse_ctx) catch |err|
|
||||
try self.handleAndReportParseError(lib.path, err, &parse_ctx);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user