Skip to content

Commit

Permalink
[Windows] Use dwarf-4 for clang builds on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
bruvzg authored and WhalesState committed Dec 15, 2024
1 parent de4eba2 commit 368ff04
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 368ff04

Please sign in to comment.