authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-07-03 19:50:33-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-07-07 22:43:53-07:00
log4ccc6f2b5777afd06f0fddbea4e0e0d0c92b007d
tree8b53ece560d6706659b8221a59aa53c661f4dae9
parent64899076624f24025728484ffd6762c94e15173f

compiler: fix remaining build failures


6 files changed, 15 insertions(+), 15 deletions(-)

lib/std/fs/File.zig+5-5
......@@ -1802,10 +1802,10 @@ pub const Writer = struct {
18021802 }
18031803 const copy_file_range = switch (native_os) {
18041804 .freebsd => std.os.freebsd.copy_file_range,
1805 .linux => if (std.c.versionCheck(.{ .major = 2, .minor = 27, .patch = 0 })) std.os.linux.wrapped.copy_file_range else void,
1806 else => void,
1805 .linux => if (std.c.versionCheck(.{ .major = 2, .minor = 27, .patch = 0 })) std.os.linux.wrapped.copy_file_range else {},
1806 else => {},
18071807 };
1808 if (copy_file_range != void) cfr: {
1808 if (@TypeOf(copy_file_range) != void) cfr: {
18091809 if (w.copy_file_range_err != null) break :cfr;
18101810 const buffered = limit.slice(file_reader.interface.buffer);
18111811 if (io_w.end != 0 or buffered.len != 0) return drain(io_w, &.{buffered}, 1);
......@@ -1814,7 +1814,7 @@ pub const Writer = struct {
18141814 const off_in_ptr: ?*i64 = switch (file_reader.mode) {
18151815 .positional_reading, .streaming_reading => return error.Unimplemented,
18161816 .positional => p: {
1817 off_in = file_reader.pos;
1817 off_in = @intCast(file_reader.pos);
18181818 break :p &off_in;
18191819 },
18201820 .streaming => null,
......@@ -1823,7 +1823,7 @@ pub const Writer = struct {
18231823 const off_out_ptr: ?*i64 = switch (w.mode) {
18241824 .positional_reading, .streaming_reading => return error.Unimplemented,
18251825 .positional => p: {
1826 off_out = w.pos;
1826 off_out = @intCast(w.pos);
18271827 break :p &off_out;
18281828 },
18291829 .streaming => null,
src/libs/freebsd.zig+2-2
......@@ -497,13 +497,13 @@ pub fn buildSharedObjects(comp: *Compilation, prog_node: std.Progress.Node) anye
497497 .lt => continue,
498498 .gt => {
499499 // TODO Expose via compile error mechanism instead of log.
500 log.warn("invalid target FreeBSD libc version: {}", .{target_version});
500 log.warn("invalid target FreeBSD libc version: {f}", .{target_version});
501501 return error.InvalidTargetLibCVersion;
502502 },
503503 }
504504 } else blk: {
505505 const latest_index = metadata.all_versions.len - 1;
506 log.warn("zig cannot build new FreeBSD libc version {}; providing instead {}", .{
506 log.warn("zig cannot build new FreeBSD libc version {f}; providing instead {f}", .{
507507 target_version, metadata.all_versions[latest_index],
508508 });
509509 break :blk latest_index;
src/libs/glibc.zig+2-2
......@@ -736,13 +736,13 @@ pub fn buildSharedObjects(comp: *Compilation, prog_node: std.Progress.Node) anye
736736 .lt => continue,
737737 .gt => {
738738 // TODO Expose via compile error mechanism instead of log.
739 log.warn("invalid target glibc version: {}", .{target_version});
739 log.warn("invalid target glibc version: {f}", .{target_version});
740740 return error.InvalidTargetGLibCVersion;
741741 },
742742 }
743743 } else blk: {
744744 const latest_index = metadata.all_versions.len - 1;
745 log.warn("zig cannot build new glibc version {}; providing instead {}", .{
745 log.warn("zig cannot build new glibc version {f}; providing instead {f}", .{
746746 target_version, metadata.all_versions[latest_index],
747747 });
748748 break :blk latest_index;
src/libs/netbsd.zig+2-2
......@@ -442,13 +442,13 @@ pub fn buildSharedObjects(comp: *Compilation, prog_node: std.Progress.Node) anye
442442 .lt => continue,
443443 .gt => {
444444 // TODO Expose via compile error mechanism instead of log.
445 log.warn("invalid target NetBSD libc version: {}", .{target_version});
445 log.warn("invalid target NetBSD libc version: {f}", .{target_version});
446446 return error.InvalidTargetLibCVersion;
447447 },
448448 }
449449 } else blk: {
450450 const latest_index = metadata.all_versions.len - 1;
451 log.warn("zig cannot build new NetBSD libc version {}; providing instead {}", .{
451 log.warn("zig cannot build new NetBSD libc version {f}; providing instead {f}", .{
452452 target_version, metadata.all_versions[latest_index],
453453 });
454454 break :blk latest_index;
src/link/Lld.zig+1-1
......@@ -294,7 +294,7 @@ fn linkAsArchive(lld: *Lld, arena: Allocator) !void {
294294 break :p try comp.resolveEmitPathFlush(arena, .temp, base.zcu_object_basename.?);
295295 } else null;
296296
297 log.debug("zcu_obj_path={?}", .{zcu_obj_path});
297 log.debug("zcu_obj_path={?f}", .{zcu_obj_path});
298298
299299 const compiler_rt_path: ?Cache.Path = if (comp.compiler_rt_strat == .obj)
300300 comp.compiler_rt_obj.?.full_object_path
src/translate_c.zig+3-3
......@@ -3327,7 +3327,7 @@ fn transConstantExpr(c: *Context, scope: *Scope, expr: *const clang.Expr, used:
33273327 return maybeSuppressResult(c, used, as_node);
33283328 },
33293329 else => |kind| {
3330 return fail(c, error.UnsupportedTranslation, expr.getBeginLoc(), "unsupported constant expression kind '{f}'", .{kind});
3330 return fail(c, error.UnsupportedTranslation, expr.getBeginLoc(), "unsupported constant expression kind '{}'", .{kind});
33313331 },
33323332 }
33333333}
......@@ -5884,9 +5884,9 @@ fn escapeUnprintables(ctx: *Context, m: *MacroCtx) ![]const u8 {
58845884 if (std.unicode.utf8ValidateSlice(zigified)) return zigified;
58855885
58865886 const formatter = std.ascii.hexEscape(zigified, .lower);
5887 const encoded_size = @as(usize, @intCast(std.fmt.count("{fs}", .{formatter})));
5887 const encoded_size: usize = @intCast(std.fmt.count("{f}", .{formatter}));
58885888 const output = try ctx.arena.alloc(u8, encoded_size);
5889 return std.fmt.bufPrint(output, "{fs}", .{formatter}) catch |err| switch (err) {
5889 return std.fmt.bufPrint(output, "{f}", .{formatter}) catch |err| switch (err) {
58905890 error.NoSpaceLeft => unreachable,
58915891 else => |e| return e,
58925892 };