pgo scons patch taken from

http://forums.dolphin-emu.com/archive/index.php/thread-3852.html



git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5012 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
nakeee 2010-02-05 09:53:33 +00:00
parent 722488a0b3
commit 5485506293

View File

@ -126,6 +126,10 @@ vars.AddVariables(
ignorecase = 2
),
PathVariable('wxconfig', 'Path to the wxconfig', None),
EnumVariable('pgo', 'Profile-Guided Optimization (generate or use)', 'none',
allowed_values = ('none', 'generate', 'use'),
ignorecase = 2
),
('CC', 'The c compiler', 'gcc'),
('CXX', 'The c++ compiler', 'g++'),
)
@ -215,6 +219,14 @@ else:
env['CXXFLAGS'] = compileFlags + [ '-fvisibility-inlines-hidden' ]
env['CPPDEFINES'] = cppDefines
# pgo - Profile Guided Optimization
if env['pgo']=='generate':
compileFlags.append('-fprofile-generate')
env['LINKFLAGS']='-fprofile-generate'
if env['pgo']=='use':
compileFlags.append('-fprofile-use')
env['LINKFLAGS']='-fprofile-use'
# Configuration tests section
tests = {'CheckWXConfig' : wxconfig.CheckWXConfig,