From cde945f2ef9da17ad7a2c3e1545bb8ade19a1403 Mon Sep 17 00:00:00 2001 From: Tim Culverhouse Date: Fri, 19 Apr 2024 16:22:46 -0800 Subject: [PATCH] build: use std.Build.path --- build.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.zig b/build.zig index 1eaf471..88f8363 100644 --- a/build.zig +++ b/build.zig @@ -3,7 +3,7 @@ const std = @import("std"); pub fn build(b: *std.Build) void { const target = b.standardTargetOptions(.{}); const optimize = b.standardOptimizeOption(.{}); - const root_source_file = std.Build.LazyPath.relative("src/main.zig"); + const root_source_file = b.path("src/main.zig"); // Dependencies const ziglyph_dep = b.dependency("ziglyph", .{ @@ -48,7 +48,7 @@ pub fn build(b: *std.Build) void { const example = b.addExecutable(.{ .name = "example", // future versions should use b.path, see zig PR #19597 - .root_source_file = std.Build.LazyPath.relative( + .root_source_file = b.path( b.fmt("examples/{s}.zig", .{@tagName(example_option)}), ), .target = target, @@ -62,7 +62,7 @@ pub fn build(b: *std.Build) void { const tests_step = b.step("test", "Run tests"); const tests = b.addTest(.{ - .root_source_file = .{ .path = "src/main.zig" }, + .root_source_file = b.path("src/main.zig"), .target = target, .optimize = optimize, });