Compare commits

...

2 Commits

Author SHA1 Message Date
fead2457be
build: fix windows debug builds
Some checks failed
CI / build (-Dbuild-tests -Dbuild-benchmarks, true, macos-latest, 0.14.0) (push) Has been cancelled
CI / build (macos-latest, master) (push) Has been cancelled
CI / build (ubuntu-latest, 0.14.0) (push) Has been cancelled
CI / build (windows-latest, 0.14.0) (push) Has been cancelled
2025-04-08 18:37:55 -06:00
e398fefdf6
build: support 0.14.0
This drops support for older zig versions.
2025-03-05 21:00:39 -07:00
4 changed files with 19 additions and 12 deletions

View File

@ -12,13 +12,17 @@ jobs:
strategy:
fail-fast: false
matrix:
zig-version: ["0.13.0"]
os: [ubuntu-latest, macos-latest, windows-latest]
zig-version: ["0.14.0"]
os: [ubuntu-latest, windows-latest]
include:
- zig-version: "master"
- zig-version: "0.14.0"
check-format: true
os: macos-latest
build-options: "-Dbuild-tests -Dbuild-benchmarks"
- zig-version: "master"
os: macos-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout

View File

@ -55,6 +55,8 @@ pub fn build(b: *std.Build) void {
lib.linkSystemLibrary("dbghelp");
lib.linkSystemLibrary("ole32");
lib.linkSystemLibrary("shell32");
if (optimize == .Debug)
lib.linkSystemLibrary("ucrtbased");
lib.addCSourceFiles(.{
.root = src_root,
.files = win_sources,
@ -81,10 +83,10 @@ pub fn build(b: *std.Build) void {
include_root.path(b, "uv/unix.h"),
"uv/unix.h",
);
if (!tinfo.isAndroid())
if (!tinfo.abi.isAndroid())
lib.linkSystemLibrary("pthread");
if (tinfo.isDarwin()) {
if (tinfo.os.tag.isDarwin()) {
lib.root_module.addCMacro("_DARWIN_UNLIMITED_SELECT", "1");
lib.root_module.addCMacro("_DARWIN_USE_64_BIT_INODE", "1");
lib.addCSourceFiles(.{
@ -96,7 +98,7 @@ pub fn build(b: *std.Build) void {
include_root.path(b, "uv/darwin.h"),
"uv/darwin.h",
);
} else if (tinfo.isAndroid()) {
} else if (tinfo.abi.isAndroid()) {
lib.root_module.addCMacro("_GNU_SOURCE", "");
lib.linkSystemLibrary("dl");
lib.addCSourceFiles(.{

View File

@ -1,11 +1,12 @@
.{
.name = "libuv",
.name = .libuv,
.fingerprint = 0x7CB3932CBFAADA86,
.version = "1.5.0",
.minimum_zig_version = "0.13.0",
.minimum_zig_version = "0.14.0",
.dependencies = .{
.libuv = .{
.url = "git+https://github.com/libuv/libuv?ref=v1.50.0#8fb9cb919489a48880680a56efecff6a7dfb4504",
.hash = "12207ac22e5e40afe515b7c319237785113c97ee84a75f7c66c1a0e7cc6e743debeb",
.hash = "N-V-__8AAH34QwB6wi5eQK_lFbfDGSN3hRE8l-6Ep198ZsGg",
},
},
.paths = .{

View File

@ -35,8 +35,8 @@ your_exe.linkLibrary(libuv_dep.artifact("uv"));
## Zig Version Support Matrix
| Refname | libuv Version | Zig `0.13` | Zig `0.14.0-dev` |
|-----------|----------------|------------|------------------|
| | `1.50.0` | ✅ | ✅ |
| Refname | libuv Version | Zig `0.14.0` |
|-----------|----------------|--------------|
| | `1.50.0` | ✅ |
[libuv]: https://github.com/libuv