Add --32 to scons , to force building 32 bit code

This commit is contained in:
Nils O. Selåsdal
2013-10-28 20:00:56 +01:00
parent 678378c2f4
commit 215035190e
+10
View File
@@ -56,6 +56,12 @@ AddOption('--stack-protection',
help = 'Build with stack protection support'
)
AddOption('--32',
dest='force32bit',
action='store_true',
default=False,
help='Force building for 32 bit architecture'
)
build_type = GetOption('build_type')
assertions = GetOption('assertions')
@@ -85,6 +91,10 @@ env.Append(LINKFLAGS = ['-O2', '-pthread'])
env.Append(CPPDEFINES = ['_FILE_OFFSET_BITS=64'])
env.Append(CPPPATH = ['#include'])
if GetOption('force32bit'):
env.Append(CFLAGS = ['-m32'])
env.Append(LINKFLAGS = ['-m32'])
if build_type == 'release':
env.Append(CFLAGS = ['-O2'])