Commit a5fd54f8 authored by Charmaine Lee's avatar Charmaine Lee Committed by Brian Paul

svga: add opt to the list of valid build types

For opt build, add VMX86_STATS to the list of cpp defines.
Reviewed-by: Brian Paul's avatarBrian Paul <brianp@vmware.com>
parent 2e1cfcc4
...@@ -86,7 +86,7 @@ def AddOptions(opts): ...@@ -86,7 +86,7 @@ def AddOptions(opts):
from SCons.Options.EnumOption import EnumOption from SCons.Options.EnumOption import EnumOption
opts.Add(EnumOption('build', 'build type', 'debug', opts.Add(EnumOption('build', 'build type', 'debug',
allowed_values=('debug', 'checked', 'profile', allowed_values=('debug', 'checked', 'profile',
'release'))) 'release', 'opt')))
opts.Add(BoolOption('verbose', 'verbose output', 'no')) opts.Add(BoolOption('verbose', 'verbose output', 'no'))
opts.Add(EnumOption('machine', 'use machine-specific assembly code', opts.Add(EnumOption('machine', 'use machine-specific assembly code',
default_machine, default_machine,
......
...@@ -256,7 +256,7 @@ def generate(env): ...@@ -256,7 +256,7 @@ def generate(env):
if env['build'] == 'profile': if env['build'] == 'profile':
env['debug'] = False env['debug'] = False
env['profile'] = True env['profile'] = True
if env['build'] == 'release': if env['build'] in ('release', 'opt'):
env['debug'] = False env['debug'] = False
env['profile'] = False env['profile'] = False
...@@ -301,6 +301,8 @@ def generate(env): ...@@ -301,6 +301,8 @@ def generate(env):
cppdefines += ['NDEBUG'] cppdefines += ['NDEBUG']
if env['build'] == 'profile': if env['build'] == 'profile':
cppdefines += ['PROFILE'] cppdefines += ['PROFILE']
if env['build'] in ('opt', 'profile'):
cppdefines += ['VMX86_STATS']
if env['platform'] in ('posix', 'linux', 'freebsd', 'darwin'): if env['platform'] in ('posix', 'linux', 'freebsd', 'darwin'):
cppdefines += [ cppdefines += [
'_POSIX_SOURCE', '_POSIX_SOURCE',
...@@ -450,7 +452,7 @@ def generate(env): ...@@ -450,7 +452,7 @@ def generate(env):
ccflags += [ ccflags += [
'/O2', # optimize for speed '/O2', # optimize for speed
] ]
if env['build'] == 'release': if env['build'] in ('release', 'opt'):
if not env['clang']: if not env['clang']:
ccflags += [ ccflags += [
'/GL', # enable whole program optimization '/GL', # enable whole program optimization
...@@ -561,7 +563,7 @@ def generate(env): ...@@ -561,7 +563,7 @@ def generate(env):
shlinkflags += ['-Wl,--enable-stdcall-fixup'] shlinkflags += ['-Wl,--enable-stdcall-fixup']
#shlinkflags += ['-Wl,--kill-at'] #shlinkflags += ['-Wl,--kill-at']
if msvc: if msvc:
if env['build'] == 'release' and not env['clang']: if env['build'] in ('release', 'opt') and not env['clang']:
# enable Link-time Code Generation # enable Link-time Code Generation
linkflags += ['/LTCG'] linkflags += ['/LTCG']
env.Append(ARFLAGS = ['/LTCG']) env.Append(ARFLAGS = ['/LTCG'])
......
...@@ -86,6 +86,8 @@ svga_get_name( struct pipe_screen *pscreen ) ...@@ -86,6 +86,8 @@ svga_get_name( struct pipe_screen *pscreen )
*/ */
build = "build: DEBUG;"; build = "build: DEBUG;";
mutex = "mutex: " PIPE_ATOMIC ";"; mutex = "mutex: " PIPE_ATOMIC ";";
#elif defined(VMX86_STATS)
build = "build: OPT;";
#else #else
build = "build: RELEASE;"; build = "build: RELEASE;";
#endif #endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment