summaryrefslogtreecommitdiffstats
path: root/scons/generic.py
diff options
context:
space:
mode:
Diffstat (limited to 'scons/generic.py')
-rw-r--r--scons/generic.py20
1 files changed, 14 insertions, 6 deletions
diff --git a/scons/generic.py b/scons/generic.py
index 23231966731..01a374e3633 100644
--- a/scons/generic.py
+++ b/scons/generic.py
@@ -405,17 +405,19 @@ def generate(env):
]
if env['machine'] == 'x86_64':
ccflags += ['-m64']
+ # 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',
- '-pedantic',
+ '-std=gnu99',
'-fmessage-length=0', # be nice to Eclipse
]
- cflags += [
- '-Wmissing-prototypes',
- ]
if msvc:
# See also:
# - http://msdn.microsoft.com/en-us/library/19z1t1wy.aspx
@@ -425,6 +427,7 @@ def generate(env):
'/Od', # disable optimizations
'/Oi', # enable intrinsic functions
'/Oy-', # disable frame pointer omission
+ '/GL-', # disable whole program optimization
]
else:
ccflags += [
@@ -516,10 +519,15 @@ def generate(env):
linkflags += ['-m32']
if env['machine'] == 'x86_64':
linkflags += ['-m64']
- if platform == 'winddk':
+ if platform == 'windows' and msvc:
# See also:
# - http://msdn2.microsoft.com/en-us/library/y0zzbyt4.aspx
linkflags += [
+ '/fixed:no',
+ '/incremental:no',
+ ]
+ if platform == 'winddk':
+ linkflags += [
'/merge:_PAGE=PAGE',
'/merge:_TEXT=.text',
'/section:INIT,d',
@@ -546,7 +554,7 @@ def generate(env):
'/entry:DrvEnableDriver',
]
- if env['profile']:
+ if env['debug'] or env['profile']:
linkflags += [
'/MAP', # http://msdn.microsoft.com/en-us/library/k7xkk3e2.aspx
]