diff options
| author | ruki <[email protected]> | 2021-11-13 13:46:36 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-11-13 13:46:36 +0800 |
| commit | 6b684d5cc448124c31a51fff71e4043667677a57 (patch) | |
| tree | 8ea5f63bf177eaad1e1d00d4f8533ac6dcd61cc3 /xmake/modules/core | |
| parent | 8907c57014dedbd68da377cb25a92096c0c713d8 (diff) | |
add frameworks for rust
Diffstat (limited to 'xmake/modules/core')
| -rw-r--r-- | xmake/modules/core/tools/rustc.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/xmake/modules/core/tools/rustc.lua b/xmake/modules/core/tools/rustc.lua index fa358e897..19588136a 100644 --- a/xmake/modules/core/tools/rustc.lua +++ b/xmake/modules/core/tools/rustc.lua @@ -65,6 +65,15 @@ function nf_syslink(self, lib) return nf_link(self, lib) 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(.-)") + if cratename then + return {"--extern", cratename .. "=" .. framework} + end +end + -- make the rpathdir flag function nf_rpathdir(self, dir) dir = path.translate(dir) |
