[llvm-bugs] Question about debug symbol

(moving this thread from llvm-bugs (which is just for our automated bug database emails) to cfe-users)

GCC uses an optimization for debug info that Clang has, but does not enable on platforms where the default debugger is LLDB (because LLDB doesn’t handle debug info that has this optimization enabled).

If you aren’t using LLDB, you can explicitly pass “-fno-standalone-debug” to get the optimized behavior and that should match or be better than GCC’s (in my experiments, LLVM’s is about half the size of GCC’s when using this flag).

If you are using LLDB, I’m not sure there’s much you can do.