From 1554ea67e1cca831455d6bb8f413b3da867f3635 Mon Sep 17 00:00:00 2001 From: ruki Date: Sun, 12 Apr 2026 21:59:16 +0800 Subject: fix syslink case for mingw --- xmake/core/package/package.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua index 395ddbfa3..bea6a2ff9 100644 --- a/xmake/core/package/package.lua +++ b/xmake/core/package/package.lua @@ -2127,6 +2127,18 @@ function _instance:fetch(opt) end end + -- normalize syslinks to lowercase for mingw on case-sensitive host filesystems, + -- because mingw import libraries are always lowercase (e.g. libbcrypt.a), + -- but windows api headers may declare mixed-case names (e.g. Bcrypt, Crypt32) + -- @see https://github.com/xmake-io/xmake/issues/9113 + if fetchinfo and fetchinfo.syslinks and self:is_plat("mingw") and os.fscase() then + local syslinks = table.wrap(fetchinfo.syslinks) + for i, link in ipairs(syslinks) do + syslinks[i] = link:lower() + end + fetchinfo.syslinks = table.unwrap(syslinks) + end + -- save to cache if usecache then self._FETCHINFO = fetchinfo -- cgit v1.3.1