mirror of
https://github.com/w23/xash3d-fwgs
synced 2024-12-15 13:41:33 +01:00
waflib: force_32bit: try to fix passing additional flags to generate 32bit code on MacOSX
This commit is contained in:
parent
2072f5c276
commit
a580e98f28
@ -37,22 +37,20 @@ def configure(conf):
|
||||
conf.env.DEST_SIZEOF_VOID_P = 8
|
||||
else:
|
||||
if check_32bit(conf, 'Checking if \'{0}\' can target 32-bit'.format(conf.env.COMPILER_CC)):
|
||||
conf.env.DEST_SIZEOF_VOID_P = 4 # predict state
|
||||
conf.env.DEST_SIZEOF_VOID_P = 4
|
||||
else:
|
||||
flag = '-m32'
|
||||
flags = ['-m32']
|
||||
# Think different.
|
||||
if(conf.env.DEST_OS == 'darwin'):
|
||||
flag = '-arch i386'
|
||||
flags = ['-arch', 'i386']
|
||||
env_stash = conf.env
|
||||
conf.env.append_value('LINKFLAGS', [flag])
|
||||
conf.env.append_value('CFLAGS', [flag])
|
||||
conf.env.append_value('CXXFLAGS', [flag])
|
||||
if check_32bit(conf, '...trying with additional flags'.format(conf.env.COMPILER_CC)):
|
||||
conf.env.append_value('LINKFLAGS', flags)
|
||||
conf.env.append_value('CFLAGS', flags)
|
||||
conf.env.append_value('CXXFLAGS', flags)
|
||||
if check_32bit(conf, '...trying with additional flags'):
|
||||
conf.env.DEST_SIZEOF_VOID_P = 4
|
||||
else:
|
||||
conf.env.DEST_SIZEOF_VOID_P = 8
|
||||
conf.env = env_stash
|
||||
if getattr(conf.env, 'BIT32_MANDATORY') and conf.env.DEST_SIZEOF_VOID_P == 8:
|
||||
conf.fatal('Compiler can\'t create 32-bit code!')
|
||||
|
||||
4
|
||||
|
Loading…
Reference in New Issue
Block a user