From 1063d8ba8b51067ba93787b33a89774bb4bfdff3 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 3 May 2022 22:03:10 -0700 Subject: [PATCH] tracy: not enabled if root doesn't export tracy_enabled --- src/tracy/tracy.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tracy/tracy.zig b/src/tracy/tracy.zig index b55ff43e7..1e7aa4d78 100644 --- a/src/tracy/tracy.zig +++ b/src/tracy/tracy.zig @@ -7,7 +7,7 @@ const root = @import("root"); const SourceLocation = std.builtin.SourceLocation; // Tracy is enabled if the root function tracy_enabled returns true. -pub const enabled = @import("root").tracy_enabled(); +pub const enabled = @hasDecl(root, "tracy_enabled") and root.tracy_enabled(); // Bring in the correct implementation depending on if we're enabled or not. // See Impl for all the real doc comments.