X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=SConstruct;h=3ae0d5eac4362940a380bc4a527e3de24d51e8dd;hb=6fe5e7e732ecb03e10c9bb430883d72d9cf0a86c;hp=19eadb3de4709b98ec2c00e96295a26fb0dac729;hpb=7a1093db9def94e1cc1aac873f98e28b92fde889;p=senf.git diff --git a/SConstruct b/SConstruct index 19eadb3..3ae0d5e 100644 --- a/SConstruct +++ b/SConstruct @@ -140,8 +140,20 @@ 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' ], + 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' ], @@ -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" )