From 49f7cd2d0ab5f8793c0b9442f9f31eed99ed5384 Mon Sep 17 00:00:00 2001 From: Waozi Date: Sat, 24 Oct 2026 05:09:26 -0300 Subject: [PATCH] Link Windows builds with winpthreads, which parallel regions use Kryon's image preview and JPEG decoding run #parallel regions, whose Ziran runtime starts POSIX threads, so the Windows link failed on pthread_create. Package checkouts are cached per runner image too: the Apps controller build compiles its own Ziran inside them, and an Ubuntu 22.04 job could not run one built on 24.04. --- .github/actions/ziran-packages/action.yml | 12 ++++++++---- Makefile | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/actions/ziran-packages/action.yml b/.github/actions/ziran-packages/action.yml index 8a375c80d..e37685f26 100644 --- a/.github/actions/ziran-packages/action.yml +++ b/.github/actions/ziran-packages/action.yml @@ -2,8 +2,9 @@ name: Fetch Ziran packages description: > Fetch the packages pinned in ziran.lock. The built Ziran compiler is cached by the runner image and the toolchain commit, so bumping another package - such as Kryon keeps it; the package checkouts are cached by the whole lock and fall back - to the previous checkouts, so a bump fetches only what changed. + such as Kryon keeps it; the package checkouts are cached by the runner image + and the whole lock and fall back to the previous checkouts, so a bump + fetches only what changed. inputs: save-toolchain: @@ -48,13 +49,16 @@ runs: restore-keys: | ziran-toolchain-${{ runner.os }}-${{ runner.arch }}-${{ steps.toolchain.outputs.system }}- + # Package checkouts can hold programs built inside them, such as the + # Ziran an Apps controller build compiles for its own lock, so they are + # kept per runner image as well. - name: Restore the package sources uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 with: path: ~/.cache/ziran/sources - key: ziran-sources-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('ziran.lock') }} + key: ziran-sources-${{ runner.os }}-${{ runner.arch }}-${{ steps.toolchain.outputs.system }}-${{ hashFiles('ziran.lock') }} restore-keys: | - ziran-sources-${{ runner.os }}-${{ runner.arch }}- + ziran-sources-${{ runner.os }}-${{ runner.arch }}-${{ steps.toolchain.outputs.system }}- - name: Fetch Ziran packages shell: sh diff --git a/Makefile b/Makefile index 6743e3302..1b5f91bbc 100644 --- a/Makefile +++ b/Makefile @@ -483,7 +483,7 @@ WEB_CFLAGS := $(filter-out -Os -DNATIVE_WINDOW_HAVE_SDL,$(COMMON_CFLAGS)) -O2 -s CLICK_CFLAGS := -Wall -Wextra -std=c99 -Os -D_DEFAULT_SOURCE -D_GNU_SOURCE -ffunction-sections -fdata-sections -DSUPPORT_FILEFORMAT_JPG=1 -DUI_EMBEDDED_ONLY=1 -DDISABLE_KRYON_FILE_DIALOG -DHAS_LIBCURL=1 -DKRYON_WITH_SYNC=1 $(AARCH64_KRYON_CURL_CFLAGS) LDFLAGS := -Wl,--gc-sections -s WINDOWS_LDFLAGS := -Wl,--gc-sections -static -static-libgcc -mwindows -WINDOWS_LDLIBS := -lgdi32 -lwinmm -lopengl32 -luser32 -lshell32 -lole32 -lcomdlg32 -lcomctl32 -luuid -lwininet -lws2_32 -liphlpapi -lcrypt32 -lsecur32 -lbcrypt -ladvapi32 -lz -lm -latomic +WINDOWS_LDLIBS := -lgdi32 -lwinmm -lopengl32 -luser32 -lshell32 -lole32 -lcomdlg32 -lcomctl32 -luuid -lwininet -lws2_32 -liphlpapi -lcrypt32 -lsecur32 -lbcrypt -ladvapi32 -lz -lm -latomic -lpthread ifneq ($(strip $(MCFGTHREADS)),) WIN64_THREAD_LDFLAGS := -L$(MCFGTHREADS)/lib else