scons 1.1.0 support
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5767 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
26517fe8a3
commit
c8884e0988
5 changed files with 782 additions and 782 deletions
|
@ -62,27 +62,27 @@ stub_env = defenv.Clone()
|
|||
cross_env(stub_env)
|
||||
|
||||
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(CCFLAGS = '-fno-strict-aliasing') # not safe for strict aliasing
|
||||
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(CCFLAGS = ['-fno-strict-aliasing']) # not safe for strict aliasing
|
||||
|
||||
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
|
||||
stub_env.Append(LINKFLAGS = '$ALIGN_FLAG') # 512 bytes align
|
||||
stub_env.Append(LINKFLAGS = '-Wl,-e,_WinMain@16') # entry point
|
||||
stub_env.Append(LINKFLAGS = '$MAP_FLAG') # generate map file
|
||||
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
|
||||
stub_env.Append(LINKFLAGS = ['-Wl,-e,_WinMain@16']) # entry point
|
||||
stub_env.Append(LINKFLAGS = ['$MAP_FLAG']) # generate map file
|
||||
|
||||
### makensis environment
|
||||
|
||||
makensis_env = defenv.Clone()
|
||||
|
||||
if not defenv['DEBUG']:
|
||||
makensis_env.Append(CCFLAGS = '-O2') # optimize
|
||||
makensis_env.Append(CCFLAGS = '-Wall') # all warnings
|
||||
makensis_env.Append(CXXFLAGS = '-Wno-non-virtual-dtor') # ignore virtual dtor warnings
|
||||
makensis_env.Append(CCFLAGS = ['-O2']) # optimize
|
||||
makensis_env.Append(CCFLAGS = ['-Wall']) # all warnings
|
||||
makensis_env.Append(CXXFLAGS = ['-Wno-non-virtual-dtor']) # ignore virtual dtor warnings
|
||||
|
||||
conf = FlagsConfigure(makensis_env)
|
||||
conf.CheckCompileFlag('-m32') #
|
||||
|
@ -98,24 +98,24 @@ plugin_env = defenv.Clone()
|
|||
cross_env(plugin_env)
|
||||
|
||||
if not defenv['DEBUG']:
|
||||
plugin_env.Append(CCFLAGS = '-Os') # optimize for size
|
||||
plugin_env.Append(CCFLAGS = '-Wall') # level 3 warnings
|
||||
plugin_env.Append(CCFLAGS = '-fno-strict-aliasing') # not safe for strict aliasing
|
||||
plugin_env.Append(CCFLAGS = ['-Os']) # optimize for size
|
||||
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'] 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
|
||||
plugin_env.Append(LINKFLAGS = '$MAP_FLAG') # generate map file
|
||||
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
|
||||
|
||||
### cross-platform util environment
|
||||
|
||||
cp_util_env = defenv.Clone()
|
||||
|
||||
if not defenv['DEBUG']:
|
||||
cp_util_env.Append(CCFLAGS = '-O2') # optimize
|
||||
cp_util_env.Append(CCFLAGS = '-Wall') # all warnings
|
||||
cp_util_env.Append(CCFLAGS = '-fno-strict-aliasing') # not safe for strict aliasing
|
||||
cp_util_env.Append(CCFLAGS = ['-O2']) # optimize
|
||||
cp_util_env.Append(CCFLAGS = ['-Wall']) # all warnings
|
||||
cp_util_env.Append(CCFLAGS = ['-fno-strict-aliasing']) # not safe for strict aliasing
|
||||
|
||||
conf = FlagsConfigure(cp_util_env)
|
||||
conf.CheckLinkFlag('$MAP_FLAG') # generate map file
|
||||
|
@ -126,12 +126,12 @@ conf.Finish()
|
|||
util_env = cp_util_env.Clone()
|
||||
cross_env(util_env)
|
||||
|
||||
util_env.Append(LINKFLAGS = '-mwindows') # build windows executables
|
||||
util_env.Append(LINKFLAGS = '$ALIGN_FLAG') # 512 bytes align
|
||||
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
|
||||
util_env.Append(LINKFLAGS = ['-s']) # strip
|
||||
conf.Finish()
|
||||
|
||||
### cross-platform util environment adjustments
|
||||
|
@ -177,8 +177,8 @@ def check_requirement(ctx, func, trigger):
|
|||
|
||||
flags = ctx.env['LINKFLAGS']
|
||||
|
||||
ctx.env.Append(LINKFLAGS = '$NODEFLIBS_FLAG')
|
||||
ctx.env.Append(LINKFLAGS = '-Wl,-e,___main')
|
||||
ctx.env.Append(LINKFLAGS = ['$NODEFLIBS_FLAG'])
|
||||
ctx.env.Append(LINKFLAGS = ['-Wl,-e,___main'])
|
||||
|
||||
test = """
|
||||
int __main() {
|
||||
|
|
|
@ -25,28 +25,28 @@ makensis_env = defenv.Clone()
|
|||
### use "$CXX -Ae" as the "$CC" compiler to build makensis
|
||||
|
||||
makensis_env['CC'] = makensis_env['CXX']
|
||||
makensis_env.Append(CFLAGS = '-Ae')
|
||||
makensis_env.Append(CFLAGS = ['-Ae'])
|
||||
|
||||
### required to build makensis
|
||||
|
||||
makensis_env.Append(LINKFLAGS = '-AA')
|
||||
makensis_env.Append(LINKFLAGS = '+DD32')
|
||||
makensis_env.Append(LINKFLAGS = '-mt')
|
||||
makensis_env.Append(LINKFLAGS = ['-AA'])
|
||||
makensis_env.Append(LINKFLAGS = ['+DD32'])
|
||||
makensis_env.Append(LINKFLAGS = ['-mt'])
|
||||
|
||||
makensis_env.Append(CXXFLAGS = '-AA')
|
||||
makensis_env.Append(CCFLAGS = '+DD32')
|
||||
makensis_env.Append(CCFLAGS = '-mt')
|
||||
makensis_env.Append(CXXFLAGS = ['-AA'])
|
||||
makensis_env.Append(CCFLAGS = ['+DD32'])
|
||||
makensis_env.Append(CCFLAGS = ['-mt'])
|
||||
|
||||
### debug for makensis
|
||||
|
||||
if makensis_env['DEBUG']:
|
||||
makensis_env.Append(CCFLAGS = '-g')
|
||||
makensis_env.Append(LINKFLAGS = '-g')
|
||||
makensis_env.Append(CCFLAGS = ['-g'])
|
||||
makensis_env.Append(LINKFLAGS = ['-g'])
|
||||
|
||||
### strip for makensis
|
||||
|
||||
if not makensis_env['DEBUG'] and makensis_env['STRIP']:
|
||||
makensis_env.Append(LINKFLAGS = '-s')
|
||||
makensis_env.Append(LINKFLAGS = ['-s'])
|
||||
|
||||
#
|
||||
# aCC defines _BIG_ENDIAN, but we use __BIG_ENDIAN__ so check and define as
|
||||
|
|
|
@ -15,7 +15,7 @@ defenv['MSVCRT_FLAG'] = '/MD'
|
|||
|
||||
if float(defenv['MSVS_VERSION'].replace('Exp','')) >= 8.0:
|
||||
defenv['EXCEPTION_FLAG'] = '/EHsc'
|
||||
defenv.Append(CCFLAGS = '/GS-')
|
||||
defenv.Append(CCFLAGS = ['/GS-'])
|
||||
defenv.Append(CPPDEFINES = ['_CRT_SECURE_NO_WARNINGS', '_CRT_NONSTDC_NO_WARNINGS'])
|
||||
else:
|
||||
defenv['EXCEPTION_FLAG'] = '/GX'
|
||||
|
@ -23,9 +23,9 @@ else:
|
|||
### debug
|
||||
|
||||
if defenv['DEBUG']:
|
||||
defenv.Append(CCFLAGS = '/Zi')
|
||||
defenv.Append(CCFLAGS = '/Fd${TARGET.dir}\\${TARGET.dir.file}.pdb')
|
||||
defenv.Append(LINKFLAGS = '/debug')
|
||||
defenv.Append(CCFLAGS = ['/Zi'])
|
||||
defenv.Append(CCFLAGS = ['/Fd${TARGET.dir}\\${TARGET.dir.file}.pdb'])
|
||||
defenv.Append(LINKFLAGS = ['/debug'])
|
||||
|
||||
### workarounds
|
||||
|
||||
|
@ -73,49 +73,49 @@ conf.Finish()
|
|||
stub_env = defenv.Clone()
|
||||
|
||||
if not defenv['DEBUG']:
|
||||
stub_env.Append(CCFLAGS = '/O1') # optimize for size
|
||||
stub_env.Append(CCFLAGS = '/W3') # level 3 warnings
|
||||
stub_env.Append(CCFLAGS = ['/O1']) # optimize for size
|
||||
stub_env.Append(CCFLAGS = ['/W3']) # level 3 warnings
|
||||
|
||||
stub_env.Append(LINKFLAGS = '/opt:nowin98') # 512 bytes align
|
||||
stub_env.Append(LINKFLAGS = '/entry:WinMain') # entry point
|
||||
stub_env.Append(LINKFLAGS = '$NODEFLIBS_FLAG') # no default libraries
|
||||
stub_env.Append(LINKFLAGS = '$MAP_FLAG') # generate map file
|
||||
stub_env.Append(CCFLAGS = '/FAcs') # full listing files
|
||||
stub_env.Append(CCFLAGS = '/Fa${TARGET}.lst') # listing file name
|
||||
stub_env.Append(LINKFLAGS = ['/opt:nowin98']) # 512 bytes align
|
||||
stub_env.Append(LINKFLAGS = ['/entry:WinMain']) # entry point
|
||||
stub_env.Append(LINKFLAGS = ['$NODEFLIBS_FLAG']) # no default libraries
|
||||
stub_env.Append(LINKFLAGS = ['$MAP_FLAG']) # generate map file
|
||||
stub_env.Append(CCFLAGS = ['/FAcs']) # full listing files
|
||||
stub_env.Append(CCFLAGS = ['/Fa${TARGET}.lst']) # listing file name
|
||||
|
||||
### makensis environment
|
||||
|
||||
makensis_env = defenv.Clone()
|
||||
|
||||
if not defenv['DEBUG']:
|
||||
makensis_env.Append(CCFLAGS = '/O2') # optimize for speed
|
||||
makensis_env.Append(CCFLAGS = '$EXCEPTION_FLAG') # enable exceptions
|
||||
makensis_env.Append(CCFLAGS = '/W3') # level 3 warnings
|
||||
makensis_env.Append(CCFLAGS = ['/O2']) # optimize for speed
|
||||
makensis_env.Append(CCFLAGS = ['$EXCEPTION_FLAG']) # enable exceptions
|
||||
makensis_env.Append(CCFLAGS = ['/W3']) # level 3 warnings
|
||||
|
||||
makensis_env.Append(LINKFLAGS = '/opt:nowin98') # 512 bytes align
|
||||
makensis_env.Append(LINKFLAGS = '$MAP_FLAG') # generate map file
|
||||
makensis_env.Append(LINKFLAGS = ['/opt:nowin98']) # 512 bytes align
|
||||
makensis_env.Append(LINKFLAGS = ['$MAP_FLAG']) # generate map file
|
||||
|
||||
### plugin environment
|
||||
|
||||
plugin_env = defenv.Clone(no_import_lib = 1)
|
||||
|
||||
if not defenv['DEBUG']:
|
||||
plugin_env.Append(CCFLAGS = '/O1') # optimize for size
|
||||
plugin_env.Append(CCFLAGS = '/W3') # level 3 warnings
|
||||
plugin_env.Append(CCFLAGS = ['/O1']) # optimize for size
|
||||
plugin_env.Append(CCFLAGS = ['/W3']) # level 3 warnings
|
||||
|
||||
plugin_env.Append(LINKFLAGS = '/opt:nowin98') # 512 bytes align
|
||||
plugin_env.Append(LINKFLAGS = '$MAP_FLAG') # generate map file
|
||||
plugin_env.Append(LINKFLAGS = ['/opt:nowin98']) # 512 bytes align
|
||||
plugin_env.Append(LINKFLAGS = ['$MAP_FLAG']) # generate map file
|
||||
|
||||
### util environment
|
||||
|
||||
util_env = defenv.Clone()
|
||||
|
||||
if not defenv['DEBUG']:
|
||||
util_env.Append(CCFLAGS = '/O1') # optimize for speed
|
||||
util_env.Append(CCFLAGS = '/W3') # level 3 warnings
|
||||
util_env.Append(CCFLAGS = ['/O1']) # optimize for speed
|
||||
util_env.Append(CCFLAGS = ['/W3']) # level 3 warnings
|
||||
|
||||
util_env.Append(LINKFLAGS = '/opt:nowin98') # 512 bytes align
|
||||
util_env.Append(LINKFLAGS = '$MAP_FLAG') # generate map file
|
||||
util_env.Append(LINKFLAGS = ['/opt:nowin98']) # 512 bytes align
|
||||
util_env.Append(LINKFLAGS = ['$MAP_FLAG']) # generate map file
|
||||
|
||||
### cross-platform util environment
|
||||
|
||||
|
@ -132,8 +132,8 @@ def check_requirement(ctx, func, trigger):
|
|||
|
||||
flags = ctx.env['LINKFLAGS']
|
||||
|
||||
ctx.env.Append(LINKFLAGS = '$NODEFLIBS_FLAG')
|
||||
ctx.env.Append(LINKFLAGS = '${ENTRY_FLAG("main")}')
|
||||
ctx.env.Append(LINKFLAGS = ['$NODEFLIBS_FLAG'])
|
||||
ctx.env.Append(LINKFLAGS = ['/entry:main'])
|
||||
|
||||
test = """
|
||||
int main() {
|
||||
|
|
|
@ -17,7 +17,7 @@ def check_compile_flag(ctx, flag):
|
|||
ctx.Message('Checking for compiler flag %s... ' % flag)
|
||||
|
||||
old_flags = ctx.env['CCFLAGS']
|
||||
ctx.env.Append(CCFLAGS = flag)
|
||||
ctx.env.Append(CCFLAGS = [flag])
|
||||
|
||||
test = """
|
||||
int main() {
|
||||
|
@ -29,7 +29,7 @@ def check_compile_flag(ctx, flag):
|
|||
ctx.Result(result)
|
||||
|
||||
if not result:
|
||||
ctx.env.Replace(CCFLAGS = old_flags)
|
||||
ctx.env.Replace(CCFLAGS = [old_flags])
|
||||
|
||||
return result
|
||||
|
||||
|
@ -40,7 +40,7 @@ def check_link_flag(ctx, flag, run = 0, extension = '.c', code = None):
|
|||
ctx.Message('Checking for linker flag %s... ' % flag)
|
||||
|
||||
old_flags = ctx.env['LINKFLAGS']
|
||||
ctx.env.Append(LINKFLAGS = flag)
|
||||
ctx.env.Append(LINKFLAGS = [flag])
|
||||
|
||||
if code:
|
||||
test = code
|
||||
|
@ -59,7 +59,7 @@ def check_link_flag(ctx, flag, run = 0, extension = '.c', code = None):
|
|||
ctx.Result(result)
|
||||
|
||||
if not result:
|
||||
ctx.env.Replace(LINKFLAGS = old_flags)
|
||||
ctx.env.Replace(LINKFLAGS = [old_flags])
|
||||
|
||||
return result
|
||||
|
||||
|
|
1426
SConstruct
1426
SConstruct
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue