Skip to content

Commit

Permalink
Merge pull request #5034 from bitonality/patch-1
Browse files Browse the repository at this point in the history
Fix incorrect pattern matching for rustc nf_frameworks()
  • Loading branch information
waruqi authored Apr 29, 2024
2 parents 719a40b + a5fcb16 commit f6cd253
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 f6cd253

Please sign in to comment.