You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building a static library, the full path to the object file is included in the output (This may relate to #18450).
This behavior is present in Debug and Release mode. Especially for Release builds, local path should not be shared with everyone.
Zig library
$ zig init
$ zig build
$ nm -g zig-out/lib/libtest.a
/home/user/repos/test/.zig-cache/o/9e8763c141c04c7df9724acbbf6ab810/libtest.a.o:
0000000000000000 T add
w _DYNAMIC
0000000000030240 W getauxval
U memcpy
U memset
U __zig_probe_stack
$ zig build
$ nm -g zig-out/lib/libmath.a
/home/user/repos/test-c/.zig-cache/o/df1ceb68b0cb3b5d5375d6d191b61744/lib.o:
U add
0000000000000000 T math_add
0000000000000020 T math_sub
U sub
/home/user/repos/test-c/.zig-cache/o/65d3a2b2cb6c15a834c2f7f78aaabe6d/add.o:
0000000000000000 T add
/home/user/repos/test-c/.zig-cache/o/daef4e863ef4545f15791d571b39e315/sub.o:
0000000000000000 T sub
$ zig build -Doptimize=ReleaseSafe
$ nm -g zig-out/lib/libmath.a
/home/user/repos/test-c/.zig-cache/o/f9eb70172b51837f406b61e4e5f0fbce/lib.o:
U add
0000000000000000 T math_add
0000000000000010 T math_sub
U sub
/home/user/repos/test-c/.zig-cache/o/b6b5b473535e751271e5801ee1030388/add.o:
0000000000000000 T add
/home/user/repos/test-c/.zig-cache/o/e2c1f520300946aa4150d54bb69471bd/sub.o:
0000000000000000 T sub
Expected Behavior
Only object file names and relative paths (i.a.) are present:
Zig library
$ zig init
$ zig build
$ nm -g zig-out/lib/libtest.a
libtest.a.o:
0000000000000000 T add
w _DYNAMIC
0000000000030240 W getauxval
U memcpy
U memset
U __zig_probe_stack
$ zig build
$ nm -g zig-out/lib/libmath.a
lib.o:
U add
0000000000000000 T math_add
0000000000000020 T math_sub
U sub
module/add.o:
0000000000000000 T add
module/sub.o:
0000000000000000 T sub
$ zig build -Doptimize=ReleaseSafe
$ nm -g zig-out/lib/libmath.a
lib.o:
U add
0000000000000000 T math_add
0000000000000010 T math_sub
U sub
module/add.o:
0000000000000000 T add
module/sub.o:
0000000000000000 T sub
The text was updated successfully, but these errors were encountered:
Zig Version
0.13.0
Steps to Reproduce and Observed Behavior
When building a static library, the full path to the object file is included in the output (This may relate to #18450).
This behavior is present in Debug and Release mode. Especially for Release builds, local path should not be shared with everyone.
Zig library
C library
This is also the case, when building a c-library.
build.zig
Expected Behavior
Only object file names and relative paths (i.a.) are present:
Zig library
C library
The text was updated successfully, but these errors were encountered: