My compile command is in macOS Seria isclang -std=c11 -g -Wall -Werror -fsanitize=address -file.c -o file
after it compile, it also generate an extra file.dSYM file which included all debug sybols. However, when I use WSL or other *nix system it will not generate such file, debug symbols were into embedded into executable binaries.
So I just wondering is there a way to do the same in macOS with clang.
When you compile a program in one pass, clang
actually runs dsymutil
for you, which is responsible for creating the .dSYM
file. Thus, the solution to your problem is to compile and link separately, in which case clang
won't automatically call dsymutil
.
Check this SO question for more details!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With