mirror of
https://github.com/ziglang/zig.git
synced 2026-01-21 06:45:24 +00:00
std.Build.CheckObjectStep: better error message
when reading the file fails
This commit is contained in:
parent
4efeeaac88
commit
f558c835a4
@ -314,14 +314,14 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void {
|
||||
const self = @fieldParentPtr(CheckObjectStep, "step", step);
|
||||
|
||||
const src_path = self.source.getPath(b);
|
||||
const contents = try fs.cwd().readFileAllocOptions(
|
||||
const contents = fs.cwd().readFileAllocOptions(
|
||||
gpa,
|
||||
src_path,
|
||||
self.max_bytes,
|
||||
null,
|
||||
@alignOf(u64),
|
||||
null,
|
||||
);
|
||||
) catch |err| return step.fail("unable to read '{s}': {s}", .{ src_path, @errorName(err) });
|
||||
|
||||
const output = switch (self.obj_format) {
|
||||
.macho => try MachODumper.parseAndDump(step, contents, .{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user