| ... | @@ -1627,9 +1627,8 @@ fn updateCObject(comp: *Compilation, c_object: *CObject) !void { | ... | @@ -1627,9 +1627,8 @@ fn updateCObject(comp: *Compilation, c_object: *CObject) !void { |
| 1627 | const o_sub_path = try std.fs.path.join(arena, &[_][]const u8{ "o", &digest }); | 1627 | const o_sub_path = try std.fs.path.join(arena, &[_][]const u8{ "o", &digest }); |
| 1628 | var o_dir = try comp.local_cache_directory.handle.makeOpenPath(o_sub_path, .{}); | 1628 | var o_dir = try comp.local_cache_directory.handle.makeOpenPath(o_sub_path, .{}); |
| 1629 | defer o_dir.close(); | 1629 | defer o_dir.close(); |
| 1630 | // TODO https://github.com/ziglang/zig/issues/6344 | | |
| 1631 | const tmp_basename = std.fs.path.basename(out_obj_path); | 1630 | const tmp_basename = std.fs.path.basename(out_obj_path); |
| 1632 | try std.os.renameat(zig_cache_tmp_dir.fd, tmp_basename, o_dir.fd, o_basename); | 1631 | try std.fs.rename(zig_cache_tmp_dir, tmp_basename, o_dir, o_basename); |
| 1633 | | 1632 | |
| 1634 | man.writeManifest() catch |err| { | 1633 | man.writeManifest() catch |err| { |
| 1635 | log.warn("failed to write cache manifest when compiling '{}': {}", .{ c_object.src.src_path, @errorName(err) }); | 1634 | log.warn("failed to write cache manifest when compiling '{}': {}", .{ c_object.src.src_path, @errorName(err) }); |