update to zig 0.13.0
This commit is contained in:
parent
3514b23279
commit
370520949f
3 changed files with 7 additions and 7 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,5 +1,5 @@
|
||||||
zig-out
|
zig-out
|
||||||
zig-cache
|
.zig-cache
|
||||||
stderr.log
|
stderr.log
|
||||||
__pycache__
|
__pycache__
|
||||||
.venv
|
.venv
|
||||||
|
|
10
build.zig
10
build.zig
|
@ -24,7 +24,7 @@ pub fn build(b: *std.Build) !void {
|
||||||
{
|
{
|
||||||
const unit_tests = b.addTest(.{
|
const unit_tests = b.addTest(.{
|
||||||
.name = "unit-tests",
|
.name = "unit-tests",
|
||||||
.root_source_file = .{ .path = "src/main.zig" },
|
.root_source_file = b.path("src/main.zig"),
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
|
@ -75,7 +75,7 @@ fn addExecutable(b: *std.Build, options: struct {
|
||||||
}) !*std.Build.Step.Compile {
|
}) !*std.Build.Step.Compile {
|
||||||
const exe = b.addExecutable(.{
|
const exe = b.addExecutable(.{
|
||||||
.name = "glsl_analyzer",
|
.name = "glsl_analyzer",
|
||||||
.root_source_file = .{ .path = "src/main.zig" },
|
.root_source_file = b.path("src/main.zig"),
|
||||||
.target = options.target,
|
.target = options.target,
|
||||||
.optimize = options.optimize,
|
.optimize = options.optimize,
|
||||||
});
|
});
|
||||||
|
@ -88,7 +88,7 @@ fn attachModules(step: *std.Build.Step.Compile) !void {
|
||||||
|
|
||||||
step.linkLibC();
|
step.linkLibC();
|
||||||
|
|
||||||
const compressed_spec = try CompressStep.create(b, "spec.json.zlib", .{ .path = b.pathFromRoot("spec/spec.json") });
|
const compressed_spec = try CompressStep.create(b, "spec.json.zlib", b.path("spec/spec.json"));
|
||||||
step.root_module.addAnonymousImport("glsl_spec.json.zlib", .{ .root_source_file = compressed_spec.getOutput() });
|
step.root_module.addAnonymousImport("glsl_spec.json.zlib", .{ .root_source_file = compressed_spec.getOutput() });
|
||||||
|
|
||||||
const options = b.addOptions();
|
const options = b.addOptions();
|
||||||
|
@ -123,10 +123,10 @@ const CompressStep = struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn getOutput(self: *@This()) std.Build.LazyPath {
|
pub fn getOutput(self: *@This()) std.Build.LazyPath {
|
||||||
return .{ .generated = &self.generated_file };
|
return .{ .generated = .{ .file = &self.generated_file } };
|
||||||
}
|
}
|
||||||
|
|
||||||
fn make(step: *std.Build.Step, _: *std.Progress.Node) anyerror!void {
|
fn make(step: *std.Build.Step, _: std.Progress.Node) anyerror!void {
|
||||||
const b = step.owner;
|
const b = step.owner;
|
||||||
const self: *@This() = @fieldParentPtr("step", step);
|
const self: *@This() = @fieldParentPtr("step", step);
|
||||||
const input_path = self.input.getPath(b);
|
const input_path = self.input.getPath(b);
|
||||||
|
|
|
@ -1588,7 +1588,7 @@ pub const Tokenizer = struct {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
break :blk std.ComptimeStringMap(Tag, table.slice());
|
break :blk std.StaticStringMap(Tag).initComptime(table.slice());
|
||||||
};
|
};
|
||||||
|
|
||||||
return map.get(identifier) orelse .identifier;
|
return map.get(identifier) orelse .identifier;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue