From 5e041eee11e611bc2c89dd54b1dad28d0660f335 Mon Sep 17 00:00:00 2001 From: Ekaterina Vaartis Date: Sun, 15 Jan 2023 01:18:00 +0300 Subject: Alter linux debug stacktraces handling to support more environments - Use -gdwarf-4 to support both LLVM and GCC when calling addr2line - Subtract position-independant execuable relocation when passing the address to addr2line --- SConstruct | 3 +++ 1 file changed, 3 insertions(+) (limited to 'SConstruct') diff --git a/SConstruct b/SConstruct index 1eb6c0adc8..705ef43b3d 100644 --- a/SConstruct +++ b/SConstruct @@ -540,6 +540,9 @@ if selected_platform in platform_list: env.Append(CCFLAGS=["/Od"]) else: if env["debug_symbols"]: + # Adding dwarf-4 explicitly makes stacktraces work with clang builds, + # otherwise addr2line doesn't understand them + env.Append(CCFLAGS=["-gdwarf-4"]) if env.dev_build: env.Append(CCFLAGS=["-g3"]) else: -- cgit v1.2.3