From 71793e0f7907421d5bee619ae524e5178c6f3f32 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Tue, 14 Apr 2009 21:39:54 +0100 Subject: scons: Support winddk 6001.18002. --- scons/gallium.py | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'scons/gallium.py') diff --git a/scons/gallium.py b/scons/gallium.py index e2cd0546c1..696ddd025f 100644 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -252,21 +252,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,15 +312,6 @@ 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: -- cgit v1.2.3 From 222d7841e939d13bf29148c0cba5c7513050fa1e Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Thu, 7 May 2009 08:00:42 +0100 Subject: scons: mingw is broken with -O1 and higher --- scons/gallium.py | 2 ++ scons/generic.py | 2 ++ 2 files changed, 4 insertions(+) (limited to 'scons/gallium.py') diff --git a/scons/gallium.py b/scons/gallium.py index 696ddd025f..c7e74d7e59 100644 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -317,6 +317,8 @@ def generate(env): 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']: diff --git a/scons/generic.py b/scons/generic.py index 03563e4c62..29ddf76d6f 100644 --- a/scons/generic.py +++ b/scons/generic.py @@ -398,6 +398,8 @@ def generate(env): if gcc: if debug: ccflags += ['-O0', '-g3'] + elif env['toolchain'] == 'crossmingw': + ccflags += ['-O0', '-g3'] # mingw 4.2.1 optimizer is broken else: ccflags += ['-O3', '-g0'] if env['profile']: -- cgit v1.2.3 From 0f50c4fab8acfe291ddd426f331eea5eec66ba13 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Tue, 2 Jun 2009 18:23:12 -0700 Subject: scons: Output nice summary messages instead of long command lines. You can still get the old behavior by passing the option quiet=no to scons. --- common.py | 2 +- scons/gallium.py | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'scons/gallium.py') diff --git a/common.py b/common.py index e57429eb75..a687efc86f 100644 --- a/common.py +++ b/common.py @@ -55,7 +55,7 @@ def AddOptions(opts): from SCons.Options.EnumOption import EnumOption opts.Add(BoolOption('debug', 'debug build', 'no')) opts.Add(BoolOption('profile', 'profile build', 'no')) - #opts.Add(BoolOption('quiet', 'quiet command lines', 'no')) + opts.Add(BoolOption('quiet', 'quiet command lines', 'yes')) opts.Add(EnumOption('machine', 'use machine-specific assembly code', default_machine, allowed_values=('generic', 'ppc', 'x86', 'x86_64'))) opts.Add(EnumOption('platform', 'target platform', default_platform, diff --git a/scons/gallium.py b/scons/gallium.py index c7e74d7e59..5e59636087 100644 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -42,11 +42,17 @@ import SCons.Scanner def quietCommandLines(env): # Quiet command lines # See also http://www.scons.org/wiki/HidingCommandLinesInOutput + env['ASCOMSTR'] = "Assembling $SOURCE ..." env['CCCOMSTR'] = "Compiling $SOURCE ..." + env['SHCCCOMSTR'] = "Compiling $SOURCE ..." env['CXXCOMSTR'] = "Compiling $SOURCE ..." + env['SHCXXCOMSTR'] = "Compiling $SOURCE ..." env['ARCOMSTR'] = "Archiving $TARGET ..." - env['RANLIBCOMSTR'] = "" + 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 +191,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'] -- cgit v1.2.3 From fc7f92478286041a018ac4e72d2ccedeea7c0eca Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Tue, 2 Jun 2009 18:41:12 -0700 Subject: scons: Less aggressive optimizations for MSVC 64bit compiler. MSVC 64bit compiler takes forever on some of the files. Might want to revisit this again later. --- scons/gallium.py | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'scons/gallium.py') diff --git a/scons/gallium.py b/scons/gallium.py index 5e59636087..0d5843603e 100644 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -362,11 +362,24 @@ def generate(env): '/GL-', # disable whole program optimization ] else: + if env['machine'] == 'x86_64': + cflags += [ + # Same as /O2, but without global optimizations or auto-inlining + # http://msdn.microsoft.com/en-us/library/8f8h5cxt.aspx + '/Ob1', # enable inline expansion, disable auto-inlining + '/Oi', # enable intrinsic functions + '/Ot', # favors fast code + '/Oy', # omit frame pointer + '/Gs', # enable stack probes + '/GF', # eliminate duplicate strings + '/Gy', # enable function-level linking + ] + else: + cflags += [ + '/O2', # optimize for speed + ] cflags += [ - '/Ox', # maximum optimizations - '/Oi', # enable intrinsic functions - '/Ot', # favor code speed - #'/fp:fast', # fast floating point + #'/fp:fast', # fast floating point ] if env['profile']: cflags += [ -- cgit v1.2.3 From 78dad275646b720511dac31ca6ba0535568af81f Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Thu, 4 Jun 2009 10:34:02 -0700 Subject: Revert "scons: Less aggressive optimizations for MSVC 64bit compiler." This reverts commit fc7f92478286041a018ac4e72d2ccedeea7c0eca. --- scons/gallium.py | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'scons/gallium.py') diff --git a/scons/gallium.py b/scons/gallium.py index 0d5843603e..5b3c9752bc 100644 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -362,23 +362,8 @@ def generate(env): '/GL-', # disable whole program optimization ] else: - if env['machine'] == 'x86_64': - cflags += [ - # Same as /O2, but without global optimizations or auto-inlining - # http://msdn.microsoft.com/en-us/library/8f8h5cxt.aspx - '/Ob1', # enable inline expansion, disable auto-inlining - '/Oi', # enable intrinsic functions - '/Ot', # favors fast code - '/Oy', # omit frame pointer - '/Gs', # enable stack probes - '/GF', # eliminate duplicate strings - '/Gy', # enable function-level linking - ] - else: - cflags += [ - '/O2', # optimize for speed - ] cflags += [ + '/O2', # optimize for speed #'/fp:fast', # fast floating point ] if env['profile']: -- cgit v1.2.3 From 550a2fe1b70ae8bd3126c19cc41629296936d211 Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Thu, 11 Jun 2009 12:11:37 +0200 Subject: scons: Indent abbreviated command line strings, so command messages stand out. Also add ASPPCOMSTR. --- scons/gallium.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'scons/gallium.py') diff --git a/scons/gallium.py b/scons/gallium.py index 5b3c9752bc..6e924da303 100644 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -42,17 +42,18 @@ import SCons.Scanner def quietCommandLines(env): # Quiet command lines # See also http://www.scons.org/wiki/HidingCommandLinesInOutput - env['ASCOMSTR'] = "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 ..." + 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): -- cgit v1.2.3