Skip to content

Commit f7b3c90

Browse files
authored
Merge pull request #156 from e0328eric/main
Breaking change for the type of sanitize_c (again)
2 parents 5f19274 + 5c2bdde commit f7b3c90

File tree

3 files changed

+21
-5
lines changed

3 files changed

+21
-5
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
uses: actions/configure-pages@v5
2828
- uses: mlugg/setup-zig@v1
2929
with:
30-
version: 0.15.0-dev.375+8f8f37fb0
30+
version: 0.15.0-dev.441+c1649d586
3131
- run: make docs
3232
- name: Upload artifact
3333
uses: actions/upload-pages-artifact@v3

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
matrix:
1313
os: [ubuntu-latest, macos-latest, windows-latest]
14-
zig: ["0.14.0", "0.15.0-dev.375+8f8f37fb0"]
14+
zig: ["0.14.0", "0.15.0-dev.441+c1649d586"]
1515

1616
runs-on: ${{matrix.os}}
1717

build/luajit.zig

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,13 @@ pub fn configure(b: *Build, target: Build.ResolvedTarget, optimize: std.builtin.
2828
.optimize = .ReleaseSafe,
2929
});
3030
minilua.linkLibC();
31-
minilua.root_module.sanitize_c = false;
31+
// FIXME: remove branch when zig-0.15 is released and 0.14 can be dropped
32+
const builtin = @import("builtin");
33+
if (builtin.zig_version.major == 0 and builtin.zig_version.minor < 15) {
34+
minilua.root_module.sanitize_c = false;
35+
} else {
36+
minilua.root_module.sanitize_c = .off;
37+
}
3238
minilua.addCSourceFile(.{ .file = upstream.path("src/host/minilua.c") });
3339

3440
// Generate the buildvm_arch.h file using minilua
@@ -79,7 +85,12 @@ pub fn configure(b: *Build, target: Build.ResolvedTarget, optimize: std.builtin.
7985
.optimize = .ReleaseSafe,
8086
});
8187
buildvm.linkLibC();
82-
buildvm.root_module.sanitize_c = false;
88+
// FIXME: remove branch when zig-0.15 is released and 0.14 can be dropped
89+
if (builtin.zig_version.major == 0 and builtin.zig_version.minor < 15) {
90+
buildvm.root_module.sanitize_c = false;
91+
} else {
92+
buildvm.root_module.sanitize_c = .off;
93+
}
8394

8495
// Needs to run after the buildvm_arch.h and luajit.h files are generated
8596
buildvm.step.dependOn(&dynasm_run.step);
@@ -183,7 +194,12 @@ pub fn configure(b: *Build, target: Build.ResolvedTarget, optimize: std.builtin.
183194
.files = &luajit_vm,
184195
});
185196

186-
lib.root_module.sanitize_c = false;
197+
// FIXME: remove branch when zig-0.15 is released and 0.14 can be dropped
198+
if (builtin.zig_version.major == 0 and builtin.zig_version.minor < 15) {
199+
lib.root_module.sanitize_c = false;
200+
} else {
201+
lib.root_module.sanitize_c = .off;
202+
}
187203

188204
lib.installHeader(upstream.path("src/lua.h"), "lua.h");
189205
lib.installHeader(upstream.path("src/lualib.h"), "lualib.h");

0 commit comments

Comments
 (0)