-Xlinker -reproducible flag breaks debug symbols for static library which object files has same name
Hi! For example i have library with structure like ModuleA/test.cpp, ModuleB/test.cpp, then i build it like:
#Building library
clang++ -c ModuleA/test.cpp -o ModuleA/test.o
clang++ -c ModuleB/test.cpp -o ModuleB/test.o
libtool -o module.a ModuleA/test.o ModuleB/test.o
#Now reproducing build steps from Xcode
#Compiling...
clang++ -c main.cpp -o main.o
#Linking...
clang++ -Xlinker -reproducible -o main main.o module.a
Now if we launch lldb main, we cant set breakpoint in file ModuleB/test.cpp, only in ModuleA/test.cpp, if link without -Xlinker -reproducible, both breakpoints working as expected.
Also dsymutil completely delete symbols for "duplicate" library if link with reproducible flag.
It's just example, in real static library i can't change behavior of building process, and can't change names of producing object files.
Xcode always set -Xlinker -reproducible flag, and i don't know how to disable it, and my debugging process partially broken.
ENV:
macos: 15.4.1
Xcode: 16.2