-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behavior
Description
Zig Version
0.14.0
Steps to Reproduce and Observed Behavior
When building with zig cc and preserving debug_info, there does not seem to be any way to replace the comp_dir for system components (crt, libc, libunwind, etc.) around here.
For example, when using zig cc and Rust:
$ RUSTFLAGS="--remap-path-prefix=$(pwd)=. -C strip=none" cargo build
In the resulting binary, units built outside of zig are cleaned:
$ readelf --debug-dump=info target/debug/dummy
...
<153> DW_AT_name : (indirect string, offset: 0x108ed6): src/main.rs/@/1l91654gzite33ik2xmzykra6
<157> DW_AT_stmt_list : 0x152
<15b> DW_AT_comp_dir : (indirect string, offset: 0x487a0): .
...
But these system components leak comp_dir:
$ readelf --debug-dump=info target/debug/dummy
...
<20> DW_AT_name : /home/ubuntu/zig-linux-x86_64-0.14.0/lib/libc/glibc/sysdeps/x86_64/start.S
<6b> DW_AT_comp_dir : /home/ubuntu/dummy
...
Expected Behavior
Some configuration path to pass args to the SubCompilation stage, from zig cc.
Metadata
Metadata
Assignees
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behavior