summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2026-04-13 09:29:02 +0800
committerGitHub <[email protected]>2026-04-13 09:29:02 +0800
commit346f929f7819e92e2752c7b3335894297fb02630 (patch)
tree1e70d5e44d3d4603999003352a2f1787f60e00e4
parentb1fa41d52b72eed6d55982ace4af94b60d6948de (diff)
parent53363921539beb3829e0054b4b2c868444398ee2 (diff)
Merge pull request #7483 from xmake-io/mingw
fix syslink case for mingw
-rw-r--r--xmake/core/package/package.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua
index 395ddbfa3..636b717c2 100644
--- a/xmake/core/package/package.lua
+++ b/xmake/core/package/package.lua
@@ -2127,6 +2127,20 @@ 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
+ fetchinfo = table.clone(fetchinfo)
+ local syslinks = table.wrap(fetchinfo.syslinks)
+ local results = {}
+ for i, link in ipairs(syslinks) do
+ results[i] = link:lower()
+ end
+ fetchinfo.syslinks = table.unwrap(results)
+ end
+
-- save to cache
if usecache then
self._FETCHINFO = fetchinfo