From b6589efff9e4b108efe0b65c2e53a8fa36bc8689 Mon Sep 17 00:00:00 2001 From: jess Date: Wed, 22 Apr 2026 16:33:41 -0700 Subject: [PATCH] Windows bugs --- build.bat | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/build.bat b/build.bat index 0122a4c..d8f2e2c 100644 --- a/build.bat +++ b/build.bat @@ -35,6 +35,16 @@ if %ERRORLEVEL% equ 0 ( ) ) +rem nng 1.x (bundled by nng-sys 1.4.0-rc.0) has two type mismatches that become hard +rem errors under clang 16+ (which ships in MSYS2 clangarm64). Downgrade them so the +rem vendored C builds cleanly. Harmless on older clang / gcc too. +set "NNG_RELAX=-Wno-error=incompatible-pointer-types -Wno-error=incompatible-function-pointer-types -Wno-incompatible-pointer-types -Wno-incompatible-function-pointer-types" +if defined CFLAGS ( + set "CFLAGS=%CFLAGS% %NNG_RELAX%" +) else ( + set "CFLAGS=%NNG_RELAX%" +) + cargo build --release --bin layers --target %RUST_TARGET% if %ERRORLEVEL% neq 0 ( echo cargo build failed