Upgrade to Zig 0.14 (#1538)

This commit is contained in:
Jake Wharton
2025-04-11 18:39:26 -04:00
committed by GitHub
parent 2e2f8a5cbb
commit 3eab3a7ef9
4 changed files with 5 additions and 5 deletions

View File

@@ -20,7 +20,7 @@ jobs:
- uses: mlugg/setup-zig@v1
with:
version: 0.13.0
version: 0.14.0
- run: zig build -p src/jvmMain/resources/jni
working-directory: zipline

View File

@@ -21,7 +21,7 @@ jobs:
- uses: mlugg/setup-zig@v1
with:
version: 0.13.0
version: 0.14.0
- run: zig build -p src/jvmMain/resources/jni
working-directory: zipline

View File

@@ -38,7 +38,7 @@ Download [the latest `jni-binaries` artifact](https://nightly.link/cashapp/zipli
Zipline uses Zig to cross-compile its JVM native libraries to all platforms and architectures.
This is only tested on macOS, but may work on Linux, too. Windows is not supported.
First, download or install Zig 0.13.0 to your system.
First, download or install Zig 0.14.0 to your system.
Then, execute these commands:
```

View File

@@ -2,7 +2,7 @@ const std = @import("std");
pub fn build(b: *std.Build) !void {
// The Windows builds create a .lib file in the lib/ directory which we don't need.
const deleteLib = b.addRemoveDirTree(b.getInstallPath(.prefix, "lib"));
const deleteLib = b.addRemoveDirTree(b.path(b.getInstallPath(.prefix, "lib")));
b.getInstallStep().dependOn(&deleteLib.step);
try setupTarget(b, &deleteLib.step, .linux, .aarch64, "aarch64");
@@ -28,7 +28,7 @@ fn setupTarget(b: *std.Build, step: *std.Build.Step, tag: std.Target.Os.Tag, arc
const version = try readVersionFile(&version_buf);
var quoted_version_buf: [12]u8 = undefined;
const quoted_version = try std.fmt.bufPrint(&quoted_version_buf, "\"{s}\"", .{ version });
lib.defineCMacro("CONFIG_VERSION", quoted_version);
lib.root_module.addCMacro("CONFIG_VERSION", quoted_version);
lib.addIncludePath(b.path("native/include/share"));
lib.addIncludePath(