Add Debian patch for separate stripping options for Win32 & cross-platform options

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5368 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
pabs3 2007-11-14 06:20:44 +00:00
parent 1422e49ff8
commit 018b9cc347
2 changed files with 17 additions and 5 deletions

View file

@ -67,7 +67,7 @@ stub_env.Append(CCFLAGS = '-Wall') # all warnings
stub_env.Append(CCFLAGS = '-x c') # force compile as c
stub_env.Append(CCFLAGS = '-fno-strict-aliasing') # not safe for strict aliasing
if not defenv['DEBUG'] and defenv['STRIP']:
if not defenv['DEBUG'] and defenv['STRIP'] and defenv['STRIP_W32']:
stub_env.Append(LINKFLAGS = '-s') # strip
stub_env.Append(LINKFLAGS = '-mwindows') # build windows executables
stub_env.Append(LINKFLAGS = '$NODEFLIBS_FLAG') # no standard libraries
@ -88,7 +88,7 @@ conf = FlagsConfigure(makensis_env)
conf.CheckCompileFlag('-m32') #
conf.CheckLinkFlag('-m32') #
conf.CheckLinkFlag('$MAP_FLAG') # generate map file
if not defenv['DEBUG'] and defenv['STRIP']:
if not defenv['DEBUG'] and defenv['STRIP'] and defenv['STRIP_CP']:
TestStrip(conf) # strip
conf.Finish()
@ -102,7 +102,7 @@ if not defenv['DEBUG']:
plugin_env.Append(CCFLAGS = '-Wall') # level 3 warnings
plugin_env.Append(CCFLAGS = '-fno-strict-aliasing') # not safe for strict aliasing
if not defenv['DEBUG'] and defenv['STRIP']:
if not defenv['DEBUG'] and defenv['STRIP'] and defenv['STRIP_W32']:
plugin_env.Append(LINKFLAGS = '-s') # strip
plugin_env.Append(LINKFLAGS = '-mwindows') # build windows executables
plugin_env.Append(LINKFLAGS = '$ALIGN_FLAG') # 512 bytes align
@ -119,8 +119,6 @@ cp_util_env.Append(CCFLAGS = '-fno-strict-aliasing') # not safe for strict alias
conf = FlagsConfigure(cp_util_env)
conf.CheckLinkFlag('$MAP_FLAG') # generate map file
if not defenv['DEBUG'] and defenv['STRIP']:
TestStrip(conf) # strip
conf.Finish()
### util environment
@ -131,6 +129,18 @@ cross_env(util_env)
util_env.Append(LINKFLAGS = '-mwindows') # build windows executables
util_env.Append(LINKFLAGS = '$ALIGN_FLAG') # 512 bytes align
conf = FlagsConfigure(util_env)
if not defenv['DEBUG'] and defenv['STRIP'] and defenv['STRIP_W32']:
util_env.Append(LINKFLAGS = '-s') # strip
conf.Finish()
### cross-platform util environment stripping
conf = FlagsConfigure(cp_util_env)
if not defenv['DEBUG'] and defenv['STRIP'] and defenv['STRIP_CP']:
TestStrip(conf) # strip
conf.Finish()
### test environment
test_env = defenv.Clone()

View file

@ -175,6 +175,8 @@ opts.Add(('APPEND_LINKFLAGS', 'Additional linker flags'))
opts.Add(BoolOption('DEBUG', 'Build executables with debugging information', 'no'))
opts.Add(PathOption('CODESIGNER', 'A program used to sign executables', None))
opts.Add(BoolOption('STRIP', 'Strips executables of any unrequired data such as symbols', 'yes'))
opts.Add(BoolOption('STRIP_CP', 'Strips cross-platform executables of any unrequired data such as symbols', 'yes'))
opts.Add(BoolOption('STRIP_W32', 'Strips Win32 executables of any unrequired data such as symbols', 'yes'))
# path related build options
opts.Add(('PREFIX_DEST', 'Intermediate installation prefix (extra install time prefix)', dirs['dest']))
opts.Add(('PREFIX_CONF', 'Path to install nsisconf.nsh to', dirs['conf']))