X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=SConstruct;h=b992cd6f55da9a6f09f46a785ce9ddeff90fc314;hb=a4ebeef29f8eb69dc2dad10668d762540002b924;hp=fce3c2d0de8f24433fb48553bcb9cc44bef7d364;hpb=bf6bdcb90de19ed474535d41c5519518921b717b;p=senf.git diff --git a/SConstruct b/SConstruct index fce3c2d..b992cd6 100644 --- a/SConstruct +++ b/SConstruct @@ -140,9 +140,21 @@ if not logname: def configFilesOpts(target, source, env, for_signature): return [ '-I%s' % os.path.split(f)[1] for f in env['LOCAL_CONFIG_FILES'] ] +# Options used to debug inlining: +# +# INLINE_OPTS = [ '-finline-limit=20000', '--param','large-function-growth=10000', +# '--param', 'large-function-insns=10000', '--param','inline-unit-growth=10000', +# '-fvisibility-inlines-hidden', '-fno-inline-functions', '-Winline' ] +# +# BEWARE: You need lots of ram to compile with these settings (approx 1G) +# + +INLINE_OPTS = [ '-finline-limit=5000' ] + env.Append( CPPPATH = [ '#/include' ], - LIBS = [ 'readline', '$BOOSTREGEXLIB', '$BOOSTIOSTREAMSLIB' ], + CXXFLAGS = [ '-Wall', '-Woverloaded-virtual', '-Wno-long-long' ] + INLINE_OPTS, + LIBS = [ 'readline', 'rt', '$BOOSTREGEXLIB', '$BOOSTIOSTREAMSLIB' ], TEST_EXTRA_LIBS = [ '$BOOSTFSLIB' ], DOXY_XREF_TYPES = [ 'bug', 'fixme', 'todo', 'idea' ], DOXY_HTML_XSL = '#/doclib/html-munge.xsl', @@ -161,6 +173,21 @@ env.Append( 'config.hh', 'local_config.hh' ], ) +def parseLogOption(value): + stream, area, level = ( x.strip() for x in value.strip().split('|') ) + if stream : stream = ''.join('(%s)' % x for x in stream.split('::') ) + else : stream = '(_)' + if area : area = ''.join( '(%s)' % x for x in area.split('::') ) + else : area = '(_)' + return '(( %s,%s,%s ))' % (stream,area,level) + +def expandLogOption(target, source, env, for_signature): + return ' '.join( parseLogOption(x) for x in env.subst('$LOGLEVELS').split() ) + +if env.subst('$LOGLEVELS'): + env.Append( expandLogOption=expandLogOption ) + env.Append( CPPDEFINES = { 'SENF_LOG_CONF': '$expandLogOption' } ) + env.SetDefault( LIBSENF = "senf" ) @@ -169,7 +196,7 @@ Export('env') # Create Doxyfile.local otherwise doxygen will barf on this non-existent file # Create it even when cleaning, to silence the doxygen builder warnings -if not env.GetOption('clean') and not os.path.exists("Doxyfile.local"): +if not os.path.exists("Doxyfile.local"): Execute(Touch("Doxyfile.local")) # Create local_config.h