From a3195e9d4eeb44032c0435f09b3e4a3dbf606777 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Mon, 5 May 2008 23:57:51 +0900 Subject: scons: A few more compiler flags adjustments to match winddk. --- common.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'common.py') diff --git a/common.py b/common.py index 6de181739b..36b190ce89 100644 --- a/common.py +++ b/common.py @@ -245,12 +245,11 @@ def generate(env): '/GX-', # disable C++ EH '/GR-', # disable C++ RTTI '/GF', # enable read-only string pooling - '/GS', # enable security checks '/G6', # optimize for PPro, P-II, P-III '/Ze', # enable extensions - #'/Gi-', # ??? + '/Gi-', # disable incremental compilation '/QIfdiv-', # disable Pentium FDIV fix - #'/hotpatch', # ??? + '/hotpatch', # prepares an image for hotpatching. #'/Z7', #enable old-style debug info ] # Put debugging information in a separate .pdb file for each object file as -- cgit v1.2.3 From 059a652d64da470ccc7f2f3266fd64721848a7be Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Sat, 24 May 2008 19:25:02 +0900 Subject: scons: New profile build. --- common.py | 14 +++++++++++++- src/gallium/auxiliary/util/SConscript | 1 + 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'common.py') diff --git a/common.py b/common.py index 36b190ce89..d3c0261d71 100644 --- a/common.py +++ b/common.py @@ -52,7 +52,8 @@ def AddOptions(opts): from SCons.Options.EnumOption import EnumOption except ImportError: from SCons.Variables.EnumVariable import EnumVariable as EnumOption - opts.Add(BoolOption('debug', 'build debug version', 'no')) + opts.Add(BoolOption('debug', 'debug build', 'no')) + opts.Add(BoolOption('profile', 'profile build', 'no')) #opts.Add(BoolOption('quiet', 'quiet command lines', 'no')) opts.Add(EnumOption('machine', 'use machine-specific assembly code', default_machine, allowed_values=('generic', 'x86', 'x86_64'))) @@ -125,6 +126,8 @@ def make_build_dir(env): build_subdir += '-' + env['machine'] if env['debug']: build_subdir += "-debug" + if env['profile']: + build_subdir += "-profile" build_dir = os.path.join(build_topdir, build_subdir) # Place the .sconsign file on the builddir too, to avoid issues with different scons # versions building the same source file @@ -154,6 +157,8 @@ def generate(env): cppdefines += ['DEBUG'] else: cppdefines += ['NDEBUG'] + if env['profile']: + cppdefines += ['PROFILE'] if platform == 'windows': cppdefines += [ 'WIN32', @@ -204,6 +209,8 @@ def generate(env): cflags += ['-O0', '-g3'] else: cflags += ['-O3', '-g3'] + if env['profile']: + cflags += ['-pg'] cflags += [ '-Wall', '-Wmissing-prototypes', @@ -228,6 +235,11 @@ def generate(env): '/Oi', # enable intrinsic functions '/Os', # favor code space ] + if env['profile']: + cflags += [ + '/Gh', # enable _penter hook function + '/GH', # enable _pexit hook function + ] if platform == 'windows': cflags += [ # TODO diff --git a/src/gallium/auxiliary/util/SConscript b/src/gallium/auxiliary/util/SConscript index d55d2c7081..0309de1ac2 100644 --- a/src/gallium/auxiliary/util/SConscript +++ b/src/gallium/auxiliary/util/SConscript @@ -5,6 +5,7 @@ util = env.ConvenienceLibrary( source = [ 'p_debug.c', 'p_debug_mem.c', + 'p_debug_prof.c', 'p_tile.c', 'p_util.c', 'u_blit.c', -- cgit v1.2.3