diff --git a/.gitignore b/.gitignore index 287a318..f833051 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ zig-cache +.zig-cache zig-out *.elf *.dol diff --git a/build.zig b/build.zig index 8e90d11..ef52ed3 100644 --- a/build.zig +++ b/build.zig @@ -42,7 +42,7 @@ pub fn build(b: *std.Build) void { /// Module function for depending on the elphin module pub fn addModule(b: *std.Build) void { _ = b.addModule("elphin", .{ - .root_source_file = .{ .path = "src/lib.zig" }, + .root_source_file = b.path("src/lib.zig"), }); } diff --git a/example-ci/build.zig b/example-ci/build.zig index cdf42e4..cdf3b9a 100644 --- a/example-ci/build.zig +++ b/example-ci/build.zig @@ -2,7 +2,7 @@ const std = @import("std"); const elphin = @import("elphin"); pub fn build(b: *std.Build) void { - const file = b.addInstallBinFile(.{ .path = "../testdata/example.elf" }, "lol.elf"); + const file = b.addInstallBinFile(b.path("../testdata/example.elf"), "lol.elf"); b.getInstallStep().dependOn(&file.step); const convert = elphin.convertInstalled(b, "lol.elf", .{}); diff --git a/src/buildlib.zig b/src/buildlib.zig index e661af3..4736a6f 100644 --- a/src/buildlib.zig +++ b/src/buildlib.zig @@ -22,7 +22,7 @@ pub fn convertExecutable(b: *std.Build, artifact: *std.Build.Step.Compile, optio pub fn convertInstalled(b: *std.Build, path: []const u8, options: ConvertFileOptions) *Self { const inputPath = b.getInstallPath(options.installDir, path); - return convertFile(b, .{ .path = inputPath }, options); + return convertFile(b, .{ .cwd_relative = inputPath }, options); } fn convertFile(b: *std.Build, file: std.Build.LazyPath, options: ConvertFileOptions) *Self { @@ -41,7 +41,7 @@ fn convertFile(b: *std.Build, file: std.Build.LazyPath, options: ConvertFileOpti return self; } -fn make(step: *std.Build.Step, _: *std.Progress.Node) !void { +fn make(step: *std.Build.Step, _: std.Progress.Node) !void { const self: *Self = @fieldParentPtr("step", step); const b = step.owner;