X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=SConstruct;h=655e3a7dd256ab01cfe65e33aff46e63d937bd79;hb=3aced0177a1c69c7af338b4e66db8694a71873ae;hp=8b5429c4ec20623446a531244a37fed0386f3f7a;hpb=6ae1710cfb7b49b91191245b7bfb06c15e829762;p=senf.git diff --git a/SConstruct b/SConstruct index 8b5429c..655e3a7 100644 --- a/SConstruct +++ b/SConstruct @@ -101,10 +101,11 @@ env.Append( '--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' ], + '-pipe', '$CXXFLAGS_', '-fno-strict-aliasing', + "${profile and '-pg' or None}" ], CXXFLAGS_final = [ '-O3' ], CXXFLAGS_normal = [ '-O2', '-g' ], CXXFLAGS_debug = [ '-O0', '-g' ], @@ -114,7 +115,7 @@ env.Append( CPPDEFINES_normal = [ 'SENF_DEBUG' ], CPPDEFINES_debug = [ '$CPPDEFINES_normal' ], - LINKFLAGS = [ '-rdynamic', '$LINKFLAGS_' ], + LINKFLAGS = [ '-rdynamic', '$LINKFLAGS_', "${profile and '-pg' or None}" ], LINKFLAGS_final = [ ], LINKFLAGS_normal = [ '-Wl,-S' ], LINKFLAGS_debug = [ '-g' ], @@ -145,6 +146,8 @@ env.SetDefault( LIBADDSUFFIX = '${FLAVOR and "_$FLAVOR" or ""}', OBJADDSUFFIX = '${LIBADDSUFFIX}', FLAVOR = '', + + PARSEFLAGS = '', ) # Set variables from command line @@ -152,6 +155,7 @@ senfutil.parseArguments( 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) ) @@ -176,7 +180,7 @@ SConscript('SConfigure') # Only add this here, after all configure checks have run env.Append(LIBS = '$LIBSENF$LIBADDSUFFIX', - EXTRA_LIBS = [ '$BOOSTREGEXLIB', '$BOOSTIOSTREAMSLIB', '$BOOSTSIGNALSLIB', + EXTRA_LIBS = [ '$BOOSTREGEXLIB', '$BOOSTSIGNALSLIB', '$BOOSTFSLIB' ]) ###########################################################################