diff options
| -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 |
