aboutsummaryrefslogtreecommitdiff
path: root/lib/init/build.zig
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2024-04-14 17:14:00 +0100
committerVeikka Tuominen <git@vexu.eu>2024-04-15 16:55:04 +0300
commitd483ba725028375cb1e290f5196daed2929e6c6c (patch)
tree86e2446979dcdebbc7da231f0844b25a1976047d /lib/init/build.zig
parentd23a8e83d43be1f209e12744925852dbd1690163 (diff)
downloadzig-d483ba725028375cb1e290f5196daed2929e6c6c.tar.gz
zig-d483ba725028375cb1e290f5196daed2929e6c6c.zip
zig init: Replace deprecated LazyPath.path with Build.path()
Diffstat (limited to 'lib/init/build.zig')
-rw-r--r--lib/init/build.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/init/build.zig b/lib/init/build.zig
index e513acdf25..d53cbbb982 100644
--- a/lib/init/build.zig
+++ b/lib/init/build.zig
@@ -19,7 +19,7 @@ pub fn build(b: *std.Build) void {
.name = "$",
// In this case the main source file is merely a path, however, in more
// complicated build scripts, this could be a generated file.
- .root_source_file = .{ .path = "src/root.zig" },
+ .root_source_file = b.path("src/root.zig"),
.target = target,
.optimize = optimize,
});
@@ -31,7 +31,7 @@ pub fn build(b: *std.Build) void {
const exe = b.addExecutable(.{
.name = "$",
- .root_source_file = .{ .path = "src/main.zig" },
+ .root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
@@ -67,7 +67,7 @@ pub fn build(b: *std.Build) void {
// Creates a step for unit testing. This only builds the test executable
// but does not run it.
const lib_unit_tests = b.addTest(.{
- .root_source_file = .{ .path = "src/root.zig" },
+ .root_source_file = b.path("src/root.zig"),
.target = target,
.optimize = optimize,
});
@@ -75,7 +75,7 @@ pub fn build(b: *std.Build) void {
const run_lib_unit_tests = b.addRunArtifact(lib_unit_tests);
const exe_unit_tests = b.addTest(.{
- .root_source_file = .{ .path = "src/main.zig" },
+ .root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});