'--param','large-function-growth=10000',
'--param', 'large-function-insns=10000',
'--param','inline-unit-growth=10000' ],
- INLINE_OPTS_NORMAL = [ '-finline-limit=5000' ],
+ INLINE_OPTS_NORMAL = [ '-finline-limit=5000', '--param', 'inline-unit-growth=60' ],
INLINE_OPTS = [ '$INLINE_OPTS_NORMAL' ],
CXXFLAGS = [ '-Wall', '-Woverloaded-virtual', '-Wno-long-long', '$INLINE_OPTS',
'-pipe', '$CXXFLAGS_', '-fno-strict-aliasing' ],
VALGRIND = "valgrind",
SCONSBIN = env.File("#/tools/scons"),
SCONSARGS = ([ '-Q', '-j$CONCURRENCY_LEVEL' ] +
- [ '%s=%s' % (k,v) for k,v in ARGUMENTS.iteritems() ]),
+ [ '%s=%s' % (k,v) for k,v in ARGLIST ]),
SCONS = "@$SCONSBIN $SCONSARGS",
CONCURRENCY_LEVEL = env.GetOption('num_jobs') or 1,
TOPDIR = env.Dir('#').abspath,
env,
BoolVariable('final', 'Build final (optimized) build', False),
BoolVariable('debug', 'Link in debug symbols', False),
+ BoolVariable('profile', 'compile and link with the profiling enabled option', False),
BoolVariable('syslayout', 'Install in to system layout directories (lib/, include/ etc)', False),
BoolVariable('sparse_tests', 'Link tests against object files and not the senf lib', False)
)
+# gprof
+if env['profile']:
+ env.Append(
+ LINKFLAGS = [ '-pg' ],
+ CXXFLAGS = [ '-pg' ],
+ )
+
+
# Add UNIX env vars matching IMPORT_ENV patterns into the execution environment
senfutil.importProcessEnv(env)
#### install_all, default, all_tests, all
env.Install('${SCONSINSTALLDIR}', [ 'site_scons/__init__.py',
'site_scons/senfutil.py',
- 'site_scons/senfconf.py',
'site_scons/yaptu.py' ])
env.InstallDir('${SCONSINSTALLDIR}', [ 'site_scons/site_tools', 'site_scons/lib' ],
FILTER_SUFFIXES=[ '','.css','.pl','.py','.sh','.sty','.xml','.xsl','.yap' ])
env.Alias('test_changes', 'all_tests')
env.Alias('all', [ 'default', 'all_tests', 'examples', 'all_docs' ])
-#### prepare
+#### prepare and -c some
env.PhonyTarget('prepare', [], [])
env.PhonyTarget('some', [], [])
env.PhonyTarget('clean', [], [
lambda **args: sys.stderr.write(
"=================================================================\n"
- "'clean' is not a valid target. Instead, use\n"
+ "'clean' is not a valid target, use the '-c' option instead:\n"
" $ scons -c all\n"
"=================================================================\n") ])