From 6d5b484ecd48cc090e6f4e6e48d15da0fdc5d47a Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Sun, 19 Jan 2020 15:36:32 -0500 Subject: [PATCH] Scons: debug builds should be unoptimized --- SConstruct | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SConstruct b/SConstruct index 4f993d19..774fd578 100644 --- a/SConstruct +++ b/SConstruct @@ -8,7 +8,7 @@ opts = Variables(None, ARGUMENTS) opts.Add(EnumVariable('OS', "Target platform", str(Platform()), ('darwin', 'win32', 'posix'))) opts.Add('toolset', "Toolset to pass to the SCons builder", 'default') -opts.Add(BoolVariable('debug', "Build with debug symbols", False)) +opts.Add(BoolVariable('debug', "Build with debug symbols and no optimization", False)) opts.Add(EnumVariable('bits', "Build for 32-bit or 64-bit architectures", '32', ('32', '64'))) # Compiler configuration @@ -47,7 +47,7 @@ env.VariantDir('#build/obj', 'src') env.VariantDir('#build/obj/test', 'test') if env['debug']: - env.Append(CCFLAGS=['-g']) + env.Append(CCFLAGS=['-g','-o0']) # This command generates the header with git revision information def gen_gitrev(env, target, source):