diff --git a/SConstruct b/SConstruct index c2e62ac..e33447f 100644 --- a/SConstruct +++ b/SConstruct @@ -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'])