mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 22:04:21 +00:00
link/MachO: avoid depending on host PATH_MAX
closes #13229 Restores ability to compile zig for WASI
This commit is contained in:
parent
3f577f06a0
commit
a4eb221b9e
1 changed files with 2 additions and 1 deletions
|
|
@ -3537,7 +3537,8 @@ pub fn populateMissingMetadata(self: *MachO) !void {
|
|||
}
|
||||
|
||||
inline fn calcInstallNameLen(cmd_size: u64, name: []const u8, assume_max_path_len: bool) u64 {
|
||||
const name_len = if (assume_max_path_len) std.os.PATH_MAX else std.mem.len(name) + 1;
|
||||
const darwin_path_max = 1024;
|
||||
const name_len = if (assume_max_path_len) darwin_path_max else std.mem.len(name) + 1;
|
||||
return mem.alignForwardGeneric(u64, cmd_size + name_len, @alignOf(u64));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue