Update to zig master

This commit is contained in:
antlilja
2024-05-16 13:15:18 +02:00
parent aa3808940e
commit 949de7684e
3 changed files with 6 additions and 6 deletions

View File

@@ -16,7 +16,7 @@ pub fn build(b: *std.Build) void {
// a file source to the generated code with `.addOutputArg("vk.zig")`
const generator_exe = b.addExecutable(.{
.name = "vulkan-zig-generator",
.root_source_file = .{ .path = "src/main.zig" },
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
@@ -45,7 +45,7 @@ pub fn build(b: *std.Build) void {
// It does not need to run anyway.
const ref_all_decls_test = b.addObject(.{
.name = "ref-all-decls-test",
.root_source_file = .{ .path = "test/ref_all_decls.zig" },
.root_source_file = b.path("test/ref_all_decls.zig"),
.target = target,
.optimize = optimize,
});
@@ -54,7 +54,7 @@ pub fn build(b: *std.Build) void {
}
const test_target = b.addTest(.{
.root_source_file = .{ .path = "src/main.zig" },
.root_source_file = b.path("src/main.zig"),
});
test_step.dependOn(&b.addRunArtifact(test_target).step);
}

View File

@@ -12,7 +12,7 @@ pub fn build(b: *std.Build) void {
const triangle_exe = b.addExecutable(.{
.name = "triangle",
.root_source_file = .{ .path = "triangle.zig" },
.root_source_file = b.path("triangle.zig"),
.target = target,
.link_libc = true,
.optimize = optimize,
@@ -24,7 +24,7 @@ pub fn build(b: *std.Build) void {
const vk_generate_cmd = b.addRunArtifact(vk_gen);
if (maybe_override_registry) |override_registry| {
vk_generate_cmd.addFileArg(.{ .path = override_registry });
vk_generate_cmd.addFileArg(b.path(override_registry));
} else {
vk_generate_cmd.addFileArg(registry);
}

View File

@@ -105,7 +105,7 @@ pub const ShaderCompileStep = struct {
/// Returns the file source for the generated shader resource code.
pub fn getSource(self: *ShaderCompileStep) Build.LazyPath {
return .{ .generated = &self.generated_file };
return .{ .generated = .{ .file = &self.generated_file } };
}
/// Add a shader to be compiled. `src` is shader source path, relative to the project root.