Skip to content

Commit f8b1887

Browse files
committed
update to version 3.12
main reason for updating version is so we can re-enable the sanitizer because it contains a fix for UB
1 parent 7032053 commit f8b1887

File tree

5 files changed

+706
-388
lines changed

5 files changed

+706
-388
lines changed

.github/workflows/artifact.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,5 @@ jobs:
3232
- uses: mlugg/setup-zig@v2
3333
- run: |
3434
zig build ci --summary all
35+
- run: |
36+
zig build ci -Dversion=3.11.4 --summary all

CompileCheck.zig

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@ pub const Kind = union(enum) {
2727

2828
pub fn create(b: *std.Build, target: std.Build.ResolvedTarget, kind: Kind) *CompileCheck {
2929
const write_files = b.addWriteFiles();
30-
const source_content = switch (kind) {
31-
.exe => |src| src,
30+
const source_duped = switch (kind) {
31+
.exe => |src| b.dupe(src),
3232
.header => |h| b.fmt("#include <{s}>", .{h}),
3333
};
3434
const source_path = write_files.add(
3535
switch (kind) {
3636
.exe => "compilecheck-exe.c",
3737
.header => "copmilecheck-header.c",
3838
},
39-
source_content,
39+
source_duped,
4040
);
4141
const check = b.allocator.create(CompileCheck) catch @panic("OOM");
4242
check.* = .{
@@ -51,10 +51,10 @@ pub fn create(b: *std.Build, target: std.Build.ResolvedTarget, kind: Kind) *Comp
5151
}),
5252
.target = target,
5353
.kind = switch (kind) {
54-
.exe => |src| .{ .exe = b.dupe(src) },
54+
.exe => .{ .exe = source_duped },
5555
.header => |h| .{ .header = b.dupe(h) },
5656
},
57-
.source_content = source_content,
57+
.source_content = source_duped,
5858
.source_path = source_path,
5959
};
6060
source_path.addStepDependencies(&check.step);

0 commit comments

Comments
 (0)