From 20248c1ca9d42fdf0b8f5a9684ab718d949226c5 Mon Sep 17 00:00:00 2001 From: kichik Date: Sat, 24 Sep 2005 11:41:41 +0000 Subject: [PATCH] no optimizations and symbol stripping in debug mode git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4288 212acab6-be3b-0410-9dea-997c60f758d6 --- SCons/Config/gnu | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/SCons/Config/gnu b/SCons/Config/gnu index b3b166f9..a571c8ee 100644 --- a/SCons/Config/gnu +++ b/SCons/Config/gnu @@ -36,11 +36,13 @@ if defenv['DEBUG']: stub_env = defenv.Copy() cross_env(stub_env) -stub_env.Append(CCFLAGS = '-Os') # optimize for size +if not defenv['DEBUG']: + stub_env.Append(CCFLAGS = '-Os') # optimize for size stub_env.Append(CCFLAGS = '-Wall') # all warnings stub_env.Append(CCFLAGS = '-x c') # force compile as c -stub_env.Append(LINKFLAGS = '-s') # strip +if not defenv['DEBUG']: + stub_env.Append(LINKFLAGS = '-s') # strip stub_env.Append(LINKFLAGS = '-mwindows') # build windows executables stub_env.Append(LINKFLAGS = '$NODEFLIBS_FLAG') # no standard libraries stub_env.Append(LINKFLAGS = '$ALIGN_FLAG') # 512 bytes align @@ -51,10 +53,12 @@ stub_env.Append(LINKFLAGS = '$MAP_FLAG') # generate map file makensis_env = defenv.Copy() -makensis_env.Append(CCFLAGS = '-O2') # optimize +if not defenv['DEBUG']: + makensis_env.Append(CCFLAGS = '-O2') # optimize makensis_env.Append(CCFLAGS = '-Wall') # all warnings -makensis_env.Append(LINKFLAGS = '-s') # strip +if not defenv['DEBUG']: + makensis_env.Append(LINKFLAGS = '-s') # strip makensis_env.Append(LINKFLAGS = '$MAP_FLAG') # generate map file ### plugin environment @@ -62,10 +66,12 @@ makensis_env.Append(LINKFLAGS = '$MAP_FLAG') # generate map file plugin_env = defenv.Copy() cross_env(plugin_env) -plugin_env.Append(CCFLAGS = '-Os') # optimize for size +if not defenv['DEBUG']: + plugin_env.Append(CCFLAGS = '-Os') # optimize for size plugin_env.Append(CCFLAGS = '-Wall') # level 3 warnings -plugin_env.Append(LINKFLAGS = '-s') # strip +if not defenv['DEBUG']: + plugin_env.Append(LINKFLAGS = '-s') # strip plugin_env.Append(LINKFLAGS = '-mwindows') # build windows executables plugin_env.Append(LINKFLAGS = '$ALIGN_FLAG') # 512 bytes align plugin_env.Append(LINKFLAGS = '$MAP_FLAG') # generate map file @@ -74,10 +80,12 @@ plugin_env.Append(LINKFLAGS = '$MAP_FLAG') # generate map file cp_util_env = defenv.Copy() -cp_util_env.Append(CCFLAGS = '-O2') # optimize +if not defenv['DEBUG']: + cp_util_env.Append(CCFLAGS = '-O2') # optimize cp_util_env.Append(CCFLAGS = '-Wall') # all warnings -cp_util_env.Append(LINKFLAGS = '-s') # strip +if not defenv['DEBUG']: + cp_util_env.Append(LINKFLAGS = '-s') # strip cp_util_env.Append(LINKFLAGS = '$MAP_FLAG') # generate map file ### util environment