POSIX fixes for native and crossplatform utils

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6427 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2014-01-21 14:13:00 +00:00
parent 859b5d3d07
commit 52a8b320ef
16 changed files with 66 additions and 46 deletions

View file

@ -135,12 +135,15 @@ plugin_uenv.Append(CPPDEFINES = ['_UNICODE', 'UNICODE'])
### cross-platform util environment
cp_util_env = tdefenv.Clone()
if defenv['PLATFORM'] == 'win32':
cp_util_env = tdefenv.Clone()
else:
cp_util_env = defenv.Clone()
cp_util_env.Append(CPPPATH = ['#$BUILD_CONFIG'])
if cp_util_env['PLATFORM'] == 'win32':
cp_util_env.Append(LINKFLAGS = ['$ALIGN_FLAG'])
cp_util_env.Append(LINKFLAGS = ['$ALIGN_FLAG']) # 512 bytes align
if not defenv['DEBUG']:
cp_util_env.Append(CCFLAGS = ['-O2']) # optimize
@ -153,9 +156,16 @@ conf.Finish()
### util environment
util_env = cp_util_env.Clone()
util_env = tdefenv.Clone()
cross_env(util_env)
util_env.Append(CPPPATH = ['#$BUILD_CONFIG'])
if not defenv['DEBUG']:
util_env.Append(CCFLAGS = ['-O2']) # optimize
util_env.Append(CCFLAGS = ['-Wall']) # all warnings
util_env.Append(CCFLAGS = ['-fno-strict-aliasing']) # not safe for strict aliasing
util_env.Append(LINKFLAGS = ['-mwindows']) # build windows executables
util_env.Append(LINKFLAGS = ['$ALIGN_FLAG']) # 512 bytes align