Add --32 to scons , to force building 32 bit code
This commit is contained in:
+10
@@ -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'])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user