mirror of
https://github.com/ziglang/zig.git
synced 2024-11-27 23:52:31 +00:00
add workaround for #5525
This commit is contained in:
parent
6524a64bda
commit
fd067fbe8b
@ -1295,10 +1295,13 @@ pub const DebugInfo = struct {
|
||||
const obj_di = try self.allocator.create(ModuleDebugInfo);
|
||||
errdefer self.allocator.destroy(obj_di);
|
||||
|
||||
const elf_file = (if (ctx.name.len > 0)
|
||||
// TODO https://github.com/ziglang/zig/issues/5525
|
||||
const copy = if (ctx.name.len > 0)
|
||||
fs.cwd().openFile(ctx.name, .{ .intended_io_mode = .blocking })
|
||||
else
|
||||
fs.openSelfExe(.{ .intended_io_mode = .blocking })) catch |err| switch (err) {
|
||||
fs.openSelfExe(.{ .intended_io_mode = .blocking });
|
||||
|
||||
const elf_file = copy catch |err| switch (err) {
|
||||
error.FileNotFound => return error.MissingDebugInfo,
|
||||
else => return err,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user