Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.
C aiderastclaude-codecode-analysiscode-intelligencecodexcursorcypherdeveloper-toolsgemini-cligraph-visualizationkilocodeknowledge-graphmcpmcp-servermodel-context-protocolopencodesqlitetree-sitterwindsurf
Fix WIN32_LIBS quoting via env vars, add skip_lint to dry-run
Martin Vogelb5f14f115dac
diff --git a/.github/workflows/dry-run.yml b/.github/workflows/dry-run.ymlindex 6ee0bd637..aa47912ab 100644--- a/.github/workflows/dry-run.yml+++ b/.github/workflows/dry-run.yml@@ -2,6 +2,11 @@ name: Dry Runon:workflow_dispatch:+ inputs:+ skip_lint:+ description: 'Skip lint step (faster iteration)'+ type: boolean+ default: falsepermissions:contents: read@@ -9,6 +14,7 @@ permissions:jobs:# ── Step 1: Lint (clang-format + cppcheck) ───────────────────lint:+ if: ${{ !inputs.skip_lint }}runs-on: ubuntu-lateststeps:- uses: actions/checkout@v4@@ -48,6 +54,7 @@ jobs:# Linux: use system gcc — full ASan/UBSan support# Windows: MSYS2 MinGW GCCtest-unix:+ if: ${{ always() && (needs.lint.result == 'success' || needs.lint.result == 'skipped') }}needs: [lint]strategy:fail-fast: false@@ -81,6 +88,7 @@ jobs:run: scripts/test.sh CC=${{ matrix.cc }} CXX=${{ matrix.cxx }}test-windows:+ if: ${{ always() && (needs.lint.result == 'success' || needs.lint.result == 'skipped') }}needs: [lint]runs-on: windows-lateststeps:@@ -98,7 +106,9 @@ jobs:- name: Testshell: msys2 {0}- run: scripts/test.sh CC=clang CXX=clang++ 'WIN32_LIBS=-lws2_32 -lpsapi -Wl,--allow-multiple-definition'+ env:+ WIN32_LIBS: -lws2_32 -lpsapi -Wl,--allow-multiple-definition+ run: scripts/test.sh CC=clang CXX=clang++# ── Step 3: Build binaries (standard + UI, all OS) ──────────build-unix:@@ -180,7 +190,9 @@ jobs:- name: Build standard binaryshell: msys2 {0}- run: scripts/build.sh CC=clang CXX=clang++ 'WIN32_LIBS=-lws2_32 -lpsapi -Wl,--allow-multiple-definition'+ env:+ WIN32_LIBS: -lws2_32 -lpsapi -Wl,--allow-multiple-definition+ run: scripts/build.sh CC=clang CXX=clang++- name: Archive standard binaryshell: pwsh@@ -190,7 +202,9 @@ jobs:- name: Build UI binaryshell: msys2 {0}- run: scripts/build.sh --with-ui CC=clang CXX=clang++ 'WIN32_LIBS=-lws2_32 -lpsapi -Wl,--allow-multiple-definition'+ env:+ WIN32_LIBS: -lws2_32 -lpsapi -Wl,--allow-multiple-definition+ run: scripts/build.sh --with-ui CC=clang CXX=clang++- name: Archive UI binaryshell: pwshdiff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex 9df25959b..42b528e4f 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -112,7 +112,9 @@ jobs:- name: Testshell: msys2 {0}- run: scripts/test.sh CC=clang CXX=clang++ 'WIN32_LIBS=-lws2_32 -lpsapi -Wl,--allow-multiple-definition'+ env:+ WIN32_LIBS: -lws2_32 -lpsapi -Wl,--allow-multiple-definition+ run: scripts/test.sh CC=clang CXX=clang++# ── Step 3: Build binaries (standard + UI, all OS) ──────────build-unix:@@ -194,7 +196,9 @@ jobs:- name: Build standard binaryshell: msys2 {0}- run: scripts/build.sh --version ${{ inputs.version }} CC=clang CXX=clang++ 'WIN32_LIBS=-lws2_32 -lpsapi -Wl,--allow-multiple-definition'+ env:+ WIN32_LIBS: -lws2_32 -lpsapi -Wl,--allow-multiple-definition+ run: scripts/build.sh --version ${{ inputs.version }} CC=clang CXX=clang++- name: Archive standard binaryshell: pwsh@@ -204,7 +208,9 @@ jobs:- name: Build UI binaryshell: msys2 {0}- run: scripts/build.sh --with-ui --version ${{ inputs.version }} CC=clang CXX=clang++ 'WIN32_LIBS=-lws2_32 -lpsapi -Wl,--allow-multiple-definition'+ env:+ WIN32_LIBS: -lws2_32 -lpsapi -Wl,--allow-multiple-definition+ run: scripts/build.sh --with-ui --version ${{ inputs.version }} CC=clang CXX=clang++- name: Archive UI binaryshell: pwshdiff --git a/Makefile.cbm b/Makefile.cbmindex 39098f1d2..a41129cff 100644--- a/Makefile.cbm+++ b/Makefile.cbm@@ -72,8 +72,9 @@ CFLAGS_TSAN = $(CFLAGS_COMMON) -g -O1 \CXXFLAGS_TSAN = $(CXXFLAGS_COMMON) -g -O1 \-fsanitize=thread -fno-omit-frame-pointer-# Windows needs ws2_32 (Winsock) and psapi (GetProcessMemoryInfo).-# Override via: make WIN32_LIBS="-lws2_32 -lpsapi" for cross-compilation.+# Windows needs ws2_32 (Winsock), psapi (GetProcessMemoryInfo), and+# --allow-multiple-definition (MinGW CRT symbol clashes).+# Pass WIN32_LIBS on command line for Windows builds.WIN32_LIBS ?=LDFLAGS = -lm -lstdc++ -lpthread -lz $(LIBGIT2_LIBS) $(WIN32_LIBS)diff --git a/scripts/build.sh b/scripts/build.shindex a8c59e736..94bf149ec 100755--- a/scripts/build.sh+++ b/scripts/build.sh@@ -87,6 +87,11 @@ verify_compiler "$CC"# Step 1: Clean C build artifacts only (not node_modules — npm ci handles that)rm -rf "$ROOT/build/c"+# Forward WIN32_LIBS from environment (set by CI env: block)+if [[ -n "${WIN32_LIBS:-}" ]]; then+ EXTRA_MAKE_ARGS+=("WIN32_LIBS=$WIN32_LIBS")+fi+# Step 2: Build (with arch prefix on macOS)if $WITH_UI; then$ARCH_PREFIX make -j"$NPROC" -f Makefile.cbm cbm-with-ui \diff --git a/scripts/test.sh b/scripts/test.shindex aa45811ea..8dca85026 100755--- a/scripts/test.sh+++ b/scripts/test.sh@@ -38,16 +38,20 @@ done# shellcheck source=env.shsource "$ROOT/scripts/env.sh"-# Forward CC/CXX and collect make-passthrough args (WIN32_LIBS=)+# Forward CC/CXX and collect make-passthrough argsMAKE_ARGS=""for arg in "$@"; docase "$arg" inCC=*|CXX=*) export "${arg}" ;;- WIN32_LIBS=*) MAKE_ARGS="$MAKE_ARGS $arg" ;;--arch|--arch=*) ;; # already handledarm64|x86_64) ;; # already handled+ *=*) MAKE_ARGS="$MAKE_ARGS $arg" ;; # forward any VAR=VAL to makeesacdone+# Also forward WIN32_LIBS from environment (set by CI env: block)+if [[ -n "${WIN32_LIBS:-}" ]]; then+ MAKE_ARGS="$MAKE_ARGS WIN32_LIBS=$WIN32_LIBS"+fiprint_env "test.sh"