summaryrefslogtreecommitdiff
path: root/scons/gallium.py
diff options
context:
space:
mode:
Diffstat (limited to 'scons/gallium.py')
-rw-r--r--scons/gallium.py50
1 files changed, 25 insertions, 25 deletions
diff --git a/scons/gallium.py b/scons/gallium.py
index e2cd0546c1..6e924da303 100644
--- a/scons/gallium.py
+++ b/scons/gallium.py
@@ -42,11 +42,18 @@ import SCons.Scanner
def quietCommandLines(env):
# Quiet command lines
# See also http://www.scons.org/wiki/HidingCommandLinesInOutput
- env['CCCOMSTR'] = "Compiling $SOURCE ..."
- env['CXXCOMSTR'] = "Compiling $SOURCE ..."
- env['ARCOMSTR'] = "Archiving $TARGET ..."
- env['RANLIBCOMSTR'] = ""
- env['LINKCOMSTR'] = "Linking $TARGET ..."
+ env['ASCOMSTR'] = " Assembling $SOURCE ..."
+ env['ASPPCOMSTR'] = " Assembling $SOURCE ..."
+ env['CCCOMSTR'] = " Compiling $SOURCE ..."
+ env['SHCCCOMSTR'] = " Compiling $SOURCE ..."
+ env['CXXCOMSTR'] = " Compiling $SOURCE ..."
+ env['SHCXXCOMSTR'] = " Compiling $SOURCE ..."
+ env['ARCOMSTR'] = " Archiving $TARGET ..."
+ env['RANLIBCOMSTR'] = " Indexing $TARGET ..."
+ env['LINKCOMSTR'] = " Linking $TARGET ..."
+ env['SHLINKCOMSTR'] = " Linking $TARGET ..."
+ env['LDMODULECOMSTR'] = " Linking $TARGET ..."
+ env['SWIGCOMSTR'] = " Generating $TARGET ..."
def createConvenienceLibBuilder(env):
@@ -185,9 +192,8 @@ def num_jobs():
def generate(env):
"""Common environment generation code"""
- # FIXME: this is already too late
- #if env.get('quiet', False):
- # quietCommandLines(env)
+ if env.get('quiet', True):
+ quietCommandLines(env)
# Toolchain
platform = env['platform']
@@ -252,21 +258,24 @@ def generate(env):
# http://msdn2.microsoft.com/en-us/library/6dwk3a1z.aspx,
'WIN32_LEAN_AND_MEAN',
]
- if msvc:
+ if msvc and env['toolchain'] != 'winddk':
cppdefines += [
'VC_EXTRALEAN',
'_CRT_SECURE_NO_DEPRECATE',
]
if debug:
cppdefines += ['_DEBUG']
- if platform == 'winddk':
+ if env['toolchain'] == 'winddk':
# Mimic WINDDK's builtin flags. See also:
# - WINDDK's bin/makefile.new i386mk.inc for more info.
# - buildchk_wxp_x86.log files, generated by the WINDDK's build
# - http://alter.org.ua/docs/nt_kernel/vc8_proj/
+ if machine == 'x86':
+ cppdefines += ['_X86_', 'i386']
+ if machine == 'x86_64':
+ cppdefines += ['_AMD64_', 'AMD64']
+ if platform == 'winddk':
cppdefines += [
- ('_X86_', '1'),
- ('i386', '1'),
'STD_CALL',
('CONDITION_HANDLING', '1'),
('NT_INST', '0'),
@@ -309,20 +318,13 @@ def generate(env):
cppdefines += ['PIPE_SUBSYSTEM_WINDOWS_CE_OGL']
env.Append(CPPDEFINES = cppdefines)
- # C preprocessor includes
- if platform == 'winddk':
- env.Append(CPPPATH = [
- env['SDK_INC_PATH'],
- env['DDK_INC_PATH'],
- env['WDM_INC_PATH'],
- env['CRT_INC_PATH'],
- ])
-
# C compiler options
cflags = []
if gcc:
if debug:
cflags += ['-O0', '-g3']
+ elif env['toolchain'] == 'crossmingw':
+ cflags += ['-O0', '-g3'] # mingw 4.2.1 optimizer is broken
else:
cflags += ['-O3', '-g3']
if env['profile']:
@@ -362,10 +364,8 @@ def generate(env):
]
else:
cflags += [
- '/Ox', # maximum optimizations
- '/Oi', # enable intrinsic functions
- '/Ot', # favor code speed
- #'/fp:fast', # fast floating point
+ '/O2', # optimize for speed
+ #'/fp:fast', # fast floating point
]
if env['profile']:
cflags += [