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
This commit is contained in:
kichik 2005-09-24 11:41:41 +00:00
parent dc2b49aece
commit 20248c1ca9

View file

@ -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