mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-17 18:40:02 +00: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
|
conf.env.DEST_SIZEOF_VOID_P = 8
|
||||||
else:
|
else:
|
||||||
if check_32bit(conf, 'Checking if \'{0}\' can target 32-bit'.format(conf.env.COMPILER_CC)):
|
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:
|
else:
|
||||||
flag = '-m32'
|
flags = ['-m32']
|
||||||
# Think different.
|
# Think different.
|
||||||
if(conf.env.DEST_OS == 'darwin'):
|
if(conf.env.DEST_OS == 'darwin'):
|
||||||
flag = '-arch i386'
|
flags = ['-arch', 'i386']
|
||||||
env_stash = conf.env
|
env_stash = conf.env
|
||||||
conf.env.append_value('LINKFLAGS', [flag])
|
conf.env.append_value('LINKFLAGS', flags)
|
||||||
conf.env.append_value('CFLAGS', [flag])
|
conf.env.append_value('CFLAGS', flags)
|
||||||
conf.env.append_value('CXXFLAGS', [flag])
|
conf.env.append_value('CXXFLAGS', flags)
|
||||||
if check_32bit(conf, '...trying with additional flags'.format(conf.env.COMPILER_CC)):
|
if check_32bit(conf, '...trying with additional flags'):
|
||||||
conf.env.DEST_SIZEOF_VOID_P = 4
|
conf.env.DEST_SIZEOF_VOID_P = 4
|
||||||
else:
|
else:
|
||||||
conf.env.DEST_SIZEOF_VOID_P = 8
|
conf.env.DEST_SIZEOF_VOID_P = 8
|
||||||
conf.env = env_stash
|
conf.env = env_stash
|
||||||
if getattr(conf.env, 'BIT32_MANDATORY') and conf.env.DEST_SIZEOF_VOID_P == 8:
|
if getattr(conf.env, 'BIT32_MANDATORY') and conf.env.DEST_SIZEOF_VOID_P == 8:
|
||||||
conf.fatal('Compiler can\'t create 32-bit code!')
|
conf.fatal('Compiler can\'t create 32-bit code!')
|
||||||
|
|
||||||
4
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user