Skip to content

Commit

Permalink
Fix build break for zig 0.14.0-dev.2596
Browse files Browse the repository at this point in the history
- There's no root_module.addCMacro anymore

- There's also no root_module.unwind_tables boolean anymore.  Setting
  "unwind_tables = .sync" should match earlier behavior.

for #130
  • Loading branch information
nurpax committed Jan 6, 2025
1 parent 90dab7e commit 3d36e37
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
uses: actions/configure-pages@v2
- uses: mlugg/setup-zig@v1
with:
version: 0.14.0-dev.1820+ea527f7a8
version: 0.14.0-dev.2596+e6879e99e
- run: make docs
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Setup Zig
uses: mlugg/setup-zig@v1
with:
version: 0.14.0-dev.1820+ea527f7a8
version: 0.14.0-dev.2596+e6879e99e

- name: Run tests
run: make test
6 changes: 4 additions & 2 deletions build/luajit.zig
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ pub fn configure(b: *Build, target: Build.ResolvedTarget, optimize: std.builtin.
.name = "lua",
.target = target,
.optimize = optimize,
.unwind_tables = .sync,
})
else
b.addStaticLibrary(.{
.name = "lua",
.target = target,
.optimize = optimize,
.unwind_tables = .sync,
});

// Compile minilua interpreter used at build time to generate files
Expand Down Expand Up @@ -163,9 +165,9 @@ pub fn configure(b: *Build, target: Build.ResolvedTarget, optimize: std.builtin.

lib.linkLibC();

lib.defineCMacro("LUAJIT_UNWIND_EXTERNAL", null);
lib.root_module.addCMacro("LUAJIT_UNWIND_EXTERNAL", "");

lib.linkSystemLibrary("unwind");
lib.root_module.unwind_tables = true;

lib.addIncludePath(upstream.path("src"));
lib.addIncludePath(luajit_h.dirname());
Expand Down

0 comments on commit 3d36e37

Please sign in to comment.