Browse Source

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 <brianp@vmware.com>
tags/13.0-branchpoint
Charmaine Lee 9 years ago
parent
commit
a5fd54f8bf
3 changed files with 8 additions and 4 deletions
  1. 1
    1
      common.py
  2. 5
    3
      scons/gallium.py
  3. 2
    0
      src/gallium/drivers/svga/svga_screen.c

+ 1
- 1
common.py View File

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,

+ 5
- 3
scons/gallium.py View File

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


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',
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
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'])

+ 2
- 0
src/gallium/drivers/svga/svga_screen.c View File

*/ */
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

Loading…
Cancel
Save