MachO: emit absolute path in N_OSO stabs #25529
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.oAfter:
0000000068e8ee50 - 00 0001 OSO /Users/mlugg/repro/.zig-cache/o/bc93e92b842c169ecffbcb97eea62dcf/librepro_zcu.o