mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
only build tracy if enabled
This commit is contained in:
@ -8,6 +8,9 @@ const libuv = @import("pkg/libuv/build.zig");
|
||||
const tracylib = @import("pkg/tracy/build.zig");
|
||||
const system_sdk = @import("vendor/mach/glfw/system_sdk.zig");
|
||||
|
||||
/// A build that is set to true if Tracy integration should be built.
|
||||
var tracy: bool = false;
|
||||
|
||||
pub fn build(b: *std.build.Builder) !void {
|
||||
const mode = b.standardReleaseOptions();
|
||||
const target = target: {
|
||||
@ -21,7 +24,7 @@ pub fn build(b: *std.build.Builder) !void {
|
||||
break :target result;
|
||||
};
|
||||
|
||||
const tracy = b.option(
|
||||
tracy = b.option(
|
||||
bool,
|
||||
"tracy",
|
||||
"Enable Tracy integration (default true in Debug on Linux)",
|
||||
@ -160,9 +163,11 @@ fn addDeps(
|
||||
|
||||
// Tracy
|
||||
step.addPackage(tracylib.pkg);
|
||||
if (tracy) {
|
||||
var tracy_step = try tracylib.link(b, step);
|
||||
system_sdk.include(b, tracy_step, .{});
|
||||
}
|
||||
}
|
||||
|
||||
fn conformanceSteps(
|
||||
b: *std.build.Builder,
|
||||
|
Reference in New Issue
Block a user