mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-17 18:40:02 +00:00
waflib: force_32bit: fix wrong DEST_SIZEOF_VOID_P when 64-bit build is allowed
This commit is contained in:
parent
4606a18b25
commit
82697ca2a9
@ -33,12 +33,11 @@ def check_32bit(ctx, msg):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
def configure(conf):
|
def configure(conf):
|
||||||
if getattr(conf.env, 'BIT32_ALLOW64'):
|
if check_32bit(conf, 'Checking if \'{0}\' can target 32-bit'.format(conf.env.COMPILER_CC)):
|
||||||
conf.env.DEST_SIZEOF_VOID_P = 8
|
conf.env.DEST_SIZEOF_VOID_P = 4
|
||||||
else:
|
else:
|
||||||
if check_32bit(conf, 'Checking if \'{0}\' can target 32-bit'.format(conf.env.COMPILER_CC)):
|
conf.env.DEST_SIZEOF_VOID_P = 8
|
||||||
conf.env.DEST_SIZEOF_VOID_P = 4
|
if not conf.env.BIT32_ALLOW64:
|
||||||
else:
|
|
||||||
flags = ['-m32']
|
flags = ['-m32']
|
||||||
# Think different.
|
# Think different.
|
||||||
if(conf.env.DEST_OS == 'darwin'):
|
if(conf.env.DEST_OS == 'darwin'):
|
||||||
@ -51,6 +50,6 @@ def configure(conf):
|
|||||||
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 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!')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user