aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Build/Step/CheckObject.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2025-08-29 20:19:23 -0700
committerAndrew Kelley <andrew@ziglang.org>2025-08-30 00:48:50 -0700
commit9a0970a12bdcae105b6f3f65c0a72d95a209bd35 (patch)
treeab0de8f2447b5e52c2bb5c92a976a52fb4b613ee /lib/std/Build/Step/CheckObject.zig
parent79f267f6b9e7f80a6fed3b1019f9de942841c3be (diff)
downloadzig-9a0970a12bdcae105b6f3f65c0a72d95a209bd35.tar.gz
zig-9a0970a12bdcae105b6f3f65c0a72d95a209bd35.zip
rework std.Io.Writer.Allocating to support runtime-known alignment
Also, breaking API changes to: * std.fs.Dir.readFileAlloc * std.fs.Dir.readFileAllocOptions
Diffstat (limited to 'lib/std/Build/Step/CheckObject.zig')
-rw-r--r--lib/std/Build/Step/CheckObject.zig9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/std/Build/Step/CheckObject.zig b/lib/std/Build/Step/CheckObject.zig
index 5fa039b772..2f7afa8dba 100644
--- a/lib/std/Build/Step/CheckObject.zig
+++ b/lib/std/Build/Step/CheckObject.zig
@@ -553,14 +553,13 @@ fn make(step: *Step, make_options: Step.MakeOptions) !void {
const src_path = check_object.source.getPath3(b, step);
const contents = src_path.root_dir.handle.readFileAllocOptions(
- gpa,
src_path.sub_path,
- check_object.max_bytes,
- null,
+ gpa,
+ .limited(check_object.max_bytes),
.of(u64),
null,
- ) catch |err| return step.fail("unable to read '{f}': {s}", .{
- std.fmt.alt(src_path, .formatEscapeChar), @errorName(err),
+ ) catch |err| return step.fail("unable to read '{f}': {t}", .{
+ std.fmt.alt(src_path, .formatEscapeChar), err,
});
var vars: std.StringHashMap(u64) = .init(gpa);