aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJustin Braben <32079903+JustinBraben@users.noreply.github.com>2024-11-29 13:13:06 -0700
committerGitHub <noreply@github.com>2024-11-29 12:13:06 -0800
commit07cd488d4216742b2a29af95e330728a0f83627f (patch)
treee55ef22c910932845a0dd0bfe28903c46eff1252 /src
parent97b8d662e63ae90bc7b8bb29221e8b79bca5bfbe (diff)
downloadzig-07cd488d4216742b2a29af95e330728a0f83627f.tar.gz
zig-07cd488d4216742b2a29af95e330728a0f83627f.zip
Add build option to set tracy-callstack-depth in `build.zig` (#21990)
Diffstat (limited to 'src')
-rw-r--r--src/tracy.zig4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/tracy.zig b/src/tracy.zig
index 08774f9bd3..e473088922 100644
--- a/src/tracy.zig
+++ b/src/tracy.zig
@@ -5,9 +5,7 @@ const build_options = @import("build_options");
pub const enable = if (builtin.is_test) false else build_options.enable_tracy;
pub const enable_allocation = enable and build_options.enable_tracy_allocation;
pub const enable_callstack = enable and build_options.enable_tracy_callstack;
-
-// TODO: make this configurable
-const callstack_depth = 10;
+pub const callstack_depth = if (enable_callstack and build_options.tracy_callstack_depth > 0) build_options.tracy_callstack_depth else 10;
const ___tracy_c_zone_context = extern struct {
id: u32,