From 86fce525c74293673925d0804fc501d18ea80963 Mon Sep 17 00:00:00 2001 From: catbot Date: Wed, 27 May 2026 02:32:01 +0000 Subject: [PATCH] pin Crafter.Asset to mingw-rotr64 fix commit so Windows CI builds The CI's mingw cross-compile (--target=x86_64-w64-mingw32) has been failing for a while at lib/gdeflate/libdeflate/lib/utils.c, where libdeflate's compiler_gcc.h defines _rotr* as macros before mingw's can declare them as functions. The fix is in Catcrafts/Crafter.Asset PR #1 (commit 021ced6); pin to that SHA so the Windows artifact jobs unblock immediately rather than waiting on master-tracking + a merge race. Once the upstream PR is merged and master is confirmed to carry the fix, the pin can be removed. Adds an optional commit arg to resolveDep so the existing "track-master" call site for Crafter.Math is unchanged. Refs Catcrafts/Crafter.Build#6. --- project.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/project.cpp b/project.cpp index a057c5a..76e69b1 100644 --- a/project.cpp +++ b/project.cpp @@ -15,7 +15,7 @@ extern "C" Configuration CrafterBuildProject(std::span a for (std::string_view a : args) { if (a == "--local") { useLocal = true; break; } } - auto resolveDep = [&](std::string_view name, std::string_view gitUrl) -> Configuration* { + auto resolveDep = [&](std::string_view name, std::string_view gitUrl, std::string_view commit = "") -> Configuration* { if (useLocal) { return LocalProject({ .projectFile = fs::path("../") / name / "project.cpp", @@ -23,7 +23,7 @@ extern "C" Configuration CrafterBuildProject(std::span a }); } return GitProject({ - .source = { .url = std::string(gitUrl) }, + .source = { .url = std::string(gitUrl), .commit = std::string(commit) }, .args = depArgs, }); }; @@ -44,7 +44,12 @@ extern "C" Configuration CrafterBuildProject(std::span a // The bootstrap (build.sh) defines no such dep — its impl unit takes the // stub branch and cfg.assets errors at runtime until a self-host rebuild. Configuration* math = resolveDep("Crafter.Math", "https://forgejo.catcrafts.net/Catcrafts/Crafter.Math.git"); - Configuration* asset = resolveDep("Crafter.Asset", "https://forgejo.catcrafts.net/Catcrafts/Crafter.Asset.git"); + // Crafter.Asset is pinned here because the mingw cross-compile needs the + // libdeflate _rotr* / stdlib.h fix from Catcrafts/Crafter.Asset PR #1. + // Once that PR lands on master and we've confirmed master tracks the fix, + // the pin can be dropped back to tip-tracking (third arg removed). + Configuration* asset = resolveDep("Crafter.Asset", "https://forgejo.catcrafts.net/Catcrafts/Crafter.Asset.git", + "021ced683d589fae7dbc7e7fa6108a9ee11bf64c"); crafterBuildLib->dependencies = { math, asset }; crafterBuildLib->defines.push_back({"CRAFTER_BUILD_HAS_ASSET", ""}); { -- 2.54.0