summaryrefslogtreecommitdiff
path: root/xmake/modules/core/tools/rustc.lua
diff options
context:
space:
mode:
authorGeorge Higashiyama <[email protected]>2024-04-29 02:56:00 -0700
committerGitHub <[email protected]>2024-04-29 02:56:00 -0700
commita5fcb16aa9e872296ccdee763522a63b376c07c5 (patch)
tree779bcf1618b2a290c76b39c6a2a99a3590d1618d /xmake/modules/core/tools/rustc.lua
parent61498e2197e74a0d77bfad7472eefcc6ea565e45 (diff)
Update rustc.lua
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