diff --git a/common.py b/common.py index 70e6708a2f9e9982be15ea65b3023b7d05bbf602..fb0884e83ff53c50abd28dfd091757a62e2eedbd 100644 --- a/common.py +++ b/common.py @@ -86,7 +86,7 @@ def AddOptions(opts): from SCons.Options.EnumOption import EnumOption opts.Add(EnumOption('build', 'build type', 'debug', allowed_values=('debug', 'checked', 'profile', - 'release'))) + 'release', 'opt'))) opts.Add(BoolOption('verbose', 'verbose output', 'no')) opts.Add(EnumOption('machine', 'use machine-specific assembly code', default_machine, diff --git a/scons/gallium.py b/scons/gallium.py index 5fc082d14290b3d8af15e83aa81a3e7144480d04..7260daa291e4b710d961e25a86de288084e8483d 100755 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -256,7 +256,7 @@ def generate(env): if env['build'] == 'profile': env['debug'] = False env['profile'] = True - if env['build'] == 'release': + if env['build'] in ('release', 'opt'): env['debug'] = False env['profile'] = False @@ -301,6 +301,8 @@ def generate(env): 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', @@ -450,7 +452,7 @@ def generate(env): ccflags += [ '/O2', # optimize for speed ] - if env['build'] == 'release': + if env['build'] in ('release', 'opt'): if not env['clang']: ccflags += [ '/GL', # enable whole program optimization @@ -561,7 +563,7 @@ def generate(env): shlinkflags += ['-Wl,--enable-stdcall-fixup'] #shlinkflags += ['-Wl,--kill-at'] 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 linkflags += ['/LTCG'] env.Append(ARFLAGS = ['/LTCG']) diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c index 7567af778927f02d7af22de0cd3c79094772786e..80d25cfe9e2a81721555ecbd4598ec1264d17e7f 100644 --- a/src/gallium/drivers/svga/svga_screen.c +++ b/src/gallium/drivers/svga/svga_screen.c @@ -86,6 +86,8 @@ svga_get_name( struct pipe_screen *pscreen ) */ build = "build: DEBUG;"; mutex = "mutex: " PIPE_ATOMIC ";"; +#elif defined(VMX86_STATS) + build = "build: OPT;"; #else build = "build: RELEASE;"; #endif