Skip to content

Conversation

@mlugg
Copy link
Member

@mlugg mlugg commented Oct 10, 2025

This path being relative is unconventional and causes issues for us if the output artifact is ever used from a different cwd than the one it was built from. The behavior implemented by this commit of always emitting these paths as absolute was actually the behavior in 0.14.x, but it regressed in 0.15.1 due to internal reworks to path handling which led to relative paths being more common in the compiler internals.

Resolves: #25433


As well as testing the repro in #25433, I validated the output by looking at nm -a zig-out/lib/librepro.dylib.
Before:
0000000068e8ee28 - 00 0001 OSO .zig-cache/o/13d349047a1695f9fa77834919794ddf/librepro_zcu.o
After:
0000000068e8ee50 - 00 0001 OSO /Users/mlugg/repro/.zig-cache/o/bc93e92b842c169ecffbcb97eea62dcf/librepro_zcu.o

This path being relative is unconventional and causes issues for us
if the output artifact is ever used from a different cwd than the one it
was built from. The behavior implemented by this commit of always
emitting these paths as absolute was actually the behavior in 0.14.x,
but it regressed in 0.15.1 due to internal reworks to path handling
which led to relative paths being more common in the compiler internals.

Resolves: ziglang#25433
@mlugg mlugg enabled auto-merge (rebase) October 10, 2025 14:22
@mlugg mlugg merged commit 45143c6 into ziglang:master Oct 10, 2025
9 checks passed
@mlugg mlugg deleted the macho-stabs-oso-abs branch October 11, 2025 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

std.debug.dumpStackTrace shows ???:?:?: for error return traces when CWD differs from source location

1 participant