From 800076a6c258fcd8fabd64879d9bab667bb4e62f Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Wed, 11 Dec 2024 13:50:36 +0200 Subject: [PATCH] [Windows] Use `dwarf-4` for clang builds on Windows. --- SConstruct | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index 931ebfd3cf9..f49ef9596c6 100644 --- a/SConstruct +++ b/SConstruct @@ -737,7 +737,10 @@ if env.msvc: else: if env["debug_symbols"]: if env["platform"] == "windows": - env.Append(CCFLAGS=["-gdwarf-5"]) + if methods.using_clang(env): + env.Append(CCFLAGS=["-gdwarf-4"]) # clang dwarf-5 symbols are broken on Windows. + else: + env.Append(CCFLAGS=["-gdwarf-5"]) # For gcc, only dwarf-5 symbols seem usable by libbacktrace. else: # Adding dwarf-4 explicitly makes stacktraces work with clang builds, # otherwise addr2line doesn't understand them