| ... | @@ -1415,9 +1415,12 @@ pub fn flushModule(self: *Elf, comp: *Compilation, prog_node: *std.Progress.Node | ... | @@ -1415,9 +1415,12 @@ pub fn flushModule(self: *Elf, comp: *Compilation, prog_node: *std.Progress.Node |
| 1415 | } | 1415 | } |
| 1416 | | 1416 | |
| 1417 | for (system_libs.items) |lib| { | 1417 | for (system_libs.items) |lib| { |
| 1418 | const in_file = try std.fs.cwd().openFile(lib.path, .{}); | | |
| 1419 | defer in_file.close(); | | |
| 1420 | var parse_ctx: ParseErrorCtx = .{ .detected_cpu_arch = undefined }; | 1418 | var parse_ctx: ParseErrorCtx = .{ .detected_cpu_arch = undefined }; |
| | 1419 | const in_file = std.fs.cwd().openFile(lib.path, .{}) catch |err| { |
| | 1420 | try self.handleAndReportParseError(lib.path, err, &parse_ctx); |
| | 1421 | continue; |
| | 1422 | }; |
| | 1423 | defer in_file.close(); |
| 1421 | self.parseLibrary(in_file, lib, false, &parse_ctx) catch |err| | 1424 | self.parseLibrary(in_file, lib, false, &parse_ctx) catch |err| |
| 1422 | try self.handleAndReportParseError(lib.path, err, &parse_ctx); | 1425 | try self.handleAndReportParseError(lib.path, err, &parse_ctx); |
| 1423 | } | 1426 | } |