Skip to content

Commit f543daf

Browse files
committed
- Fixup usage of deprecated std.Build APIs
1 parent e7b401d commit f543daf

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

build.zig

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ pub fn build(b: *std.Build) void {
7676
tracy.root_module.addCMacro("TRACY_EXPORTS", "");
7777
}
7878

79-
tracy.addIncludePath(b.path("libs/tracy/tracy"));
80-
tracy.addCSourceFile(.{
79+
tracy.root_module.addIncludePath(b.path("libs/tracy/tracy"));
80+
tracy.root_module.addCSourceFile(.{
8181
.file = b.path("libs/tracy/TracyClient.cpp"),
8282
.flags = &.{
8383
"-fno-sanitize=undefined",
@@ -88,21 +88,21 @@ pub fn build(b: *std.Build) void {
8888
if (options.enable_fibers) tracy.root_module.addCMacro("TRACY_FIBERS", "");
8989
if (options.on_demand) tracy.root_module.addCMacro("TRACY_ON_DEMAND", "");
9090

91-
tracy.linkLibC();
91+
tracy.root_module.link_libc = true;
9292
if (target.result.abi != .msvc) {
93-
tracy.linkLibCpp();
93+
tracy.root_module.link_libcpp = true;
9494
} else {
9595
tracy.root_module.addCMacro("fileno", "_fileno");
9696
}
9797

9898
switch (target.result.os.tag) {
9999
.windows => {
100-
tracy.linkSystemLibrary("ws2_32");
101-
tracy.linkSystemLibrary("dbghelp");
100+
tracy.root_module.linkSystemLibrary("ws2_32", .{});
101+
tracy.root_module.linkSystemLibrary("dbghelp", .{});
102102
},
103103
.macos => {
104104
if (b.lazyDependency("system_sdk", .{})) |system_sdk| {
105-
tracy.addFrameworkPath(system_sdk.path("System/Library/Frameworks"));
105+
tracy.root_module.addFrameworkPath(system_sdk.path("System/Library/Frameworks"));
106106
}
107107
},
108108
else => {},
@@ -120,7 +120,7 @@ pub fn build(b: *std.Build) void {
120120
.optimize = optimize,
121121
}),
122122
});
123-
tests.linkLibrary(tracy);
123+
tests.root_module.linkLibrary(tracy);
124124
b.installArtifact(tests);
125125

126126
test_step.dependOn(&b.addRunArtifact(tests).step);

0 commit comments

Comments
 (0)