summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-04-29 23:35:09 +0800
committerGitHub <[email protected]>2024-04-29 23:35:09 +0800
commitf6cd253d33ecaa60087e9dd22a5bd92afb31c40f (patch)
tree1ac6f27a254e57a92068b7d9abeb19852208df67
parent719a40bdf89162ce985e5990c0a27b58b12d2a29 (diff)
parenta5fcb16aa9e872296ccdee763522a63b376c07c5 (diff)
Merge pull request #5034 from bitonality/patch-1
Fix incorrect pattern matching for rustc nf_frameworks()
-rw-r--r--xmake/modules/core/tools/rustc.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/modules/core/tools/rustc.lua b/xmake/modules/core/tools/rustc.lua
index c2bf8db5e..13451aa96 100644
--- a/xmake/modules/core/tools/rustc.lua
+++ b/xmake/modules/core/tools/rustc.lua
@@ -78,7 +78,8 @@ end
-- make the framework flag, crate module
function nf_framework(self, framework)
local basename = path.basename(framework)
- local cratename = basename:match("lib(.-)%-.-") or basename:match("lib(.-)")
+ -- return "mycrate" from libmycrate-f882feaebb8ba0ca.rlib or libmycrate.rlib
+ local cratename = basename:match("lib(.-)%-.-") or basename:match("lib(.+)")
if cratename then
return {"--extern", cratename .. "=" .. framework}
end