from SCons.Options.EnumOption import EnumOption
opts.Add(EnumOption('build', 'build type', 'debug',
allowed_values=('debug', 'checked', 'profile',
- 'release', 'opt')))
+ 'release')))
opts.Add(BoolOption('verbose', 'verbose output', 'no'))
opts.Add(EnumOption('machine', 'use machine-specific assembly code',
default_machine,
if env['build'] == 'profile':
env['debug'] = False
env['profile'] = True
- if env['build'] in ('release', 'opt'):
+ if env['build'] == 'release':
env['debug'] = False
env['profile'] = False
cppdefines += ['NDEBUG']
if env['build'] == 'profile':
cppdefines += ['PROFILE']
- if env['build'] in ('opt', 'profile'):
- cppdefines += ['VMX86_STATS']
if env['platform'] in ('posix', 'linux', 'freebsd', 'darwin'):
cppdefines += [
'_POSIX_SOURCE',
ccflags += [
'/O2', # optimize for speed
]
- if env['build'] in ('release', 'opt'):
+ if env['build'] == 'release':
if not env['clang']:
ccflags += [
'/GL', # enable whole program optimization
shlinkflags += ['-Wl,--enable-stdcall-fixup']
#shlinkflags += ['-Wl,--kill-at']
if msvc:
- if env['build'] in ('release', 'opt') and not env['clang']:
+ if env['build'] == 'release' and not env['clang']:
# enable Link-time Code Generation
linkflags += ['/LTCG']
env.Append(ARFLAGS = ['/LTCG'])