macho linking uses incorrect value for headerpad_max_install_names #13229
Labels
bug
Observed behavior contradicts documented or intended behavior
contributor friendly
This issue is limited in scope and/or knowledge of Zig internals.
linking
os-macos
Milestone
This value,
std.os.PATH_MAX
applies to the host target. However the linker is supposed to be linking for the target given to the compiler at runtime.zig/src/link/MachO.zig
Line 3540 in 3f577f0
This bug is revealed clearly when compiling for WASI which has no
std.os.PATH_MAX
value, yet should still be able to cross-compile macos binaries:In theory we should be able to use instead something like
std.os.darwin.PATH_MAX
however the std lib is organized in a way that only makes that work if the host matches.A quickfix instead would look something like this:
The text was updated successfully, but these errors were encountered: