wscript: add options for low memory, async ns resolve and swap allocator

This commit is contained in:
mittorn
2019-10-26 12:12:59 +07:00
parent feb01b270e
commit ba1347a8ce
2 changed files with 24 additions and 11 deletions

View File

@@ -64,6 +64,9 @@ def options(opt):
grp.add_option('--enable-poly-opt', action = 'store_true', dest = 'POLLY', default = False,
help = 'enable polyhedral optimization if possible [default: %default]')
grp.add_option('--low-memory', action = 'store', dest = 'LOW_MEMORY', default = 0,
help = 'enable low memory mode (only for devices have <128 ram)')
opt.load('subproject')
opt.add_subproject(subdirs())
@@ -250,8 +253,6 @@ def configure(conf):
if not conf.env.LIB_M: # HACK: already added in xcompile!
conf.check_cc( lib='m' )
if conf.env.DEST_OS != 'android': # Android has pthread directly in libc
conf.check_cc( lib='pthread' )
else:
# Common Win32 libraries
# Don't check them more than once, to save time
@@ -287,6 +288,9 @@ def configure(conf):
conf.define('XASH_BUILD_COMMIT', conf.env.GIT_VERSION if conf.env.GIT_VERSION else 'notset')
if conf.options.LOW_MEMORY:
conf.define('XASH_LOW_MEMORY', int(conf.options.LOW_MEMORY))
for i in SUBDIRS:
if conf.env.SINGLE_BINARY and i.singlebin:
continue