From 25f0c33bb3509958a532bdd72b3945c1d5d1cad5 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Wed, 17 Jun 2009 10:14:32 +0100 Subject: scons: Debug build by default. Match what autotools and other build systems do by default. --- scons/generic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scons/generic.py') diff --git a/scons/generic.py b/scons/generic.py index 29ddf76d6f..0b3ef5a15d 100644 --- a/scons/generic.py +++ b/scons/generic.py @@ -264,7 +264,7 @@ def generate(env): pass # Build type - env['debug'] = _bool_map[ARGUMENTS.get('debug', 'no')] + env['debug'] = _bool_map[ARGUMENTS.get('debug', 'yes')] env['profile'] = _bool_map[ARGUMENTS.get('profile', 'no')] # Put build output in a separate dir, which depends on the current -- cgit v1.2.3 From c6f71eabd877e14583725a29790872e96ff4dbb2 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Wed, 17 Jun 2009 15:24:06 +0100 Subject: Revert "scons: Debug build by default." Per Brian's request. This reverts commit 25f0c33bb3509958a532bdd72b3945c1d5d1cad5. --- common.py | 2 +- scons/generic.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'scons/generic.py') diff --git a/common.py b/common.py index 2d1b258087..a687efc86f 100644 --- a/common.py +++ b/common.py @@ -53,7 +53,7 @@ def AddOptions(opts): from SCons.Variables.EnumVariable import EnumVariable as EnumOption except ImportError: from SCons.Options.EnumOption import EnumOption - opts.Add(BoolOption('debug', 'debug build', 'yes')) + opts.Add(BoolOption('debug', 'debug build', 'no')) opts.Add(BoolOption('profile', 'profile build', 'no')) opts.Add(BoolOption('quiet', 'quiet command lines', 'yes')) opts.Add(EnumOption('machine', 'use machine-specific assembly code', default_machine, diff --git a/scons/generic.py b/scons/generic.py index 0b3ef5a15d..29ddf76d6f 100644 --- a/scons/generic.py +++ b/scons/generic.py @@ -264,7 +264,7 @@ def generate(env): pass # Build type - env['debug'] = _bool_map[ARGUMENTS.get('debug', 'yes')] + env['debug'] = _bool_map[ARGUMENTS.get('debug', 'no')] env['profile'] = _bool_map[ARGUMENTS.get('profile', 'no')] # Put build output in a separate dir, which depends on the current -- cgit v1.2.3 From 25f6c936fea899dd2989c76275f3f25d3a9a7d77 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Fri, 26 Jun 2009 19:50:12 +0100 Subject: scons: Don't use C specific options with g++ --- scons/gallium.py | 45 +++++++++++++++++++++++++-------------------- scons/generic.py | 8 +++++--- 2 files changed, 30 insertions(+), 23 deletions(-) (limited to 'scons/generic.py') diff --git a/scons/gallium.py b/scons/gallium.py index 5b3c9752bc..ee45af50c2 100644 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -318,74 +318,78 @@ def generate(env): env.Append(CPPDEFINES = cppdefines) # C compiler options - cflags = [] + cflags = [] # C + cxxflags = [] # C++ + ccflags = [] # C & C++ if gcc: if debug: - cflags += ['-O0', '-g3'] + ccflags += ['-O0', '-g3'] elif env['toolchain'] == 'crossmingw': - cflags += ['-O0', '-g3'] # mingw 4.2.1 optimizer is broken + ccflags += ['-O0', '-g3'] # mingw 4.2.1 optimizer is broken else: - cflags += ['-O3', '-g3'] + ccflags += ['-O3', '-g3'] if env['profile']: - cflags += ['-pg'] + ccflags += ['-pg'] if env['machine'] == 'x86': - cflags += [ + ccflags += [ '-m32', #'-march=pentium4', '-mmmx', '-msse', '-msse2', # enable SIMD intrinsics #'-mfpmath=sse', ] if env['machine'] == 'x86_64': - cflags += ['-m64'] + ccflags += ['-m64'] # See also: # - http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html - cflags += [ - '-Werror=declaration-after-statement', + ccflags += [ '-Wall', - '-Wmissing-prototypes', '-Wmissing-field-initializers', '-Wpointer-arith', '-Wno-long-long', '-ffast-math', - '-std=gnu99', '-fmessage-length=0', # be nice to Eclipse ] + cflags += [ + '-Werror=declaration-after-statement', + '-Wmissing-prototypes', + '-std=gnu99', + ] if msvc: # See also: # - http://msdn.microsoft.com/en-us/library/19z1t1wy.aspx # - cl /? if debug: - cflags += [ + ccflags += [ '/Od', # disable optimizations '/Oi', # enable intrinsic functions '/Oy-', # disable frame pointer omission '/GL-', # disable whole program optimization ] else: - cflags += [ + ccflags += [ '/O2', # optimize for speed #'/fp:fast', # fast floating point ] if env['profile']: - cflags += [ + ccflags += [ '/Gh', # enable _penter hook function '/GH', # enable _pexit hook function ] - cflags += [ + ccflags += [ '/W3', # warning level #'/Wp64', # enable 64 bit porting warnings ] if env['machine'] == 'x86': - cflags += [ + ccflags += [ #'/QIfist', # Suppress _ftol #'/arch:SSE2', # use the SSE2 instructions ] if platform == 'windows': - cflags += [ + ccflags += [ # TODO ] if platform == 'winddk': - cflags += [ + ccflags += [ '/Zl', # omit default library name in .OBJ '/Zp8', # 8bytes struct member alignment '/Gy', # separate functions for linker @@ -404,7 +408,7 @@ def generate(env): ] if platform == 'wince': # See also C:\WINCE600\public\common\oak\misc\makefile.def - cflags += [ + ccflags += [ '/Zl', # omit default library name in .OBJ '/GF', # enable read-only string pooling '/GR-', # disable C++ RTTI @@ -421,8 +425,9 @@ def generate(env): # See http://scons.tigris.org/issues/show_bug.cgi?id=1656 env.EnsureSConsVersion(0, 98, 0) env['PDB'] = '${TARGET.base}.pdb' + env.Append(CCFLAGS = ccflags) env.Append(CFLAGS = cflags) - env.Append(CXXFLAGS = cflags) + env.Append(CXXFLAGS = cxxflags) if env['platform'] == 'windows' and msvc: # Choose the appropriate MSVC CRT diff --git a/scons/generic.py b/scons/generic.py index 29ddf76d6f..a9c2244a74 100644 --- a/scons/generic.py +++ b/scons/generic.py @@ -416,16 +416,18 @@ def generate(env): # See also: # - http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html ccflags += [ - '-Werror=declaration-after-statement', '-Wall', - '-Wmissing-prototypes', '-Wmissing-field-initializers', '-Wpointer-arith', '-Wno-long-long', '-ffast-math', - '-std=gnu99', '-fmessage-length=0', # be nice to Eclipse ] + cflags += [ + '-Werror=declaration-after-statement', + '-Wmissing-prototypes', + '-std=gnu99', + ] if msvc: # See also: # - http://msdn.microsoft.com/en-us/library/19z1t1wy.aspx -- cgit v1.2.3