X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=SConstruct;h=3a60e3a35e45068d57c5272163d81753ddb22e71;hb=5b2e9a63a43027c71ac470ac9bdecb72e8974951;hp=ebef9b973cbcf2a6531fa90411437e26a08aab0a;hpb=8db732cfb7203fbad3ffc6bddc43346af7411b46;p=senf.git diff --git a/SConstruct b/SConstruct index ebef9b9..3a60e3a 100644 --- a/SConstruct +++ b/SConstruct @@ -104,7 +104,8 @@ env.Append( 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 @@ -157,14 +160,6 @@ senfutil.parseArguments( 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)