Added perf support.
This commit is contained in:
parent
b0f91e4a4d
commit
e58c709dbb
1 changed files with 5 additions and 1 deletions
|
@ -57,7 +57,7 @@ opts.AddVariables(
|
|||
BoolVariable('enable_lto', 'Whether to enable Link Time Optimization for build=release', False),
|
||||
('arch', 'What -march option to use for build=release, will default to pentiumpro on Windows', ""),
|
||||
BoolVariable('glibcxx_debug', 'Whether to define _GLIBCXX_DEBUG and _GLIBCXX_DEBUG_PEDANTIC for build=debug', False),
|
||||
EnumVariable('profiler', 'profiler to be used for build=profile', "gprof", ["gprof", "gcov", "gperftools"]),
|
||||
EnumVariable('profiler', 'profiler to be used for build=profile', "gprof", ["gprof", "gcov", "gperftools", "perf"]),
|
||||
PathVariable('bindir', 'Where to install binaries', "bin", PathVariable.PathAccept),
|
||||
('cachedir', 'Directory that contains a cache of derived files.', ''),
|
||||
PathVariable('datadir', 'read-only architecture-independent game data', "$datarootdir/$datadirname", PathVariable.PathAccept),
|
||||
|
@ -533,6 +533,10 @@ for env in [test_env, client_env, env]:
|
|||
prof_comp_flags = ""
|
||||
prof_link_flags = "-Wl,--no-as-needed,-lprofiler"
|
||||
|
||||
if env["profiler"] == "perf":
|
||||
prof_comp_flags = Split("-ggdb -Og")
|
||||
prof_link_flags = ""
|
||||
|
||||
# #
|
||||
# End setting options for profile build
|
||||
# #
|
||||
|
|
Loading…
Add table
Reference in a new issue