diff options
| author | ruki <[email protected]> | 2026-04-12 21:59:16 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-04-12 21:59:16 +0800 |
| commit | 1554ea67e1cca831455d6bb8f413b3da867f3635 (patch) | |
| tree | de56c32195e85bb4cb0a29586cfa49c6bbe6cb3b | |
| parent | b1fa41d52b72eed6d55982ace4af94b60d6948de (diff) | |
fix syslink case for mingw
| -rw-r--r-- | xmake/core/package/package.lua | 12 |
1 files changed, 12 insertions, 0 deletions
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 |
