1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-22 15:06:45 +00:00

Add profiler option to SCons builds.

Add `tracy` option to `profiler`. If set, a tracy profiling client will be injected into the Godot binary.

# Conflicts:
#	platform/linuxbsd/godot_linuxbsd.cpp
This commit is contained in:
Lukas Tenbrink
2025-04-01 19:00:42 +02:00
parent 6fd949a6dc
commit e80194e31f
14 changed files with 266 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
"""Functions used to generate source files during build time"""
import methods
def profiler_gen_builder(target, source, env):
with methods.generated_wrapper(str(target[0])) as file:
if env["profiler"] == "tracy":
file.write("#define GODOT_USE_TRACY\n")
if env["profiler_sample_callstack"]:
file.write("#define TRACY_CALLSTACK 62\n")
if env["profiler"] == "perfetto":
file.write("#define GODOT_USE_PERFETTO\n")