Open motiejus opened 2 years ago
Also see https://github.com/ziglang/zig/issues/11194#issuecomment-1154784001: zig cc -gsplit-dwarf
does not actually move the debug info to the .dwo
file; it merely copies it, defeating the purpose of -gsplit-dwarf
.
Zig Version
0.10.0-dev.2473+e498fb155
Steps to Reproduce
A test file for everything:
Expected Behavior
main.dwo
appears in the working directory. Like withclang-13
:Actual Behavior
When compiled with
zig cc
, the dwo file is not placed to the current directory:The resulting binary points to
main.dwo
in zig's cache dir:Sure enough, the file in
/home/motiejus/.cache/zig/tmp/38be76f262cfa3bb-main.dwo
is correct. Point being: copying the file is not enough; the dwo file path in the resulting object file needs to be updated accordingly.For the record, the
clang-13
version points tomain.dwo
in the same directory: