Skip to content

Commit

Permalink
Update rustc.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
bitonality authored Apr 29, 2024
1 parent 61498e2 commit a5fcb16
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xmake/modules/core/tools/rustc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a5fcb16

Please sign in to comment.