summaryrefslogtreecommitdiff
path: root/xmake/modules/core/tools/rustc.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/modules/core/tools/rustc.lua')
-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