diff options
| author | ruki <[email protected]> | 2021-01-20 22:37:37 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-01-20 22:37:37 +0800 |
| commit | d31d03c45624d9acbc832494f71ced055b4e2a07 (patch) | |
| tree | 093e3a8840eb91124b908867babcba44037b08cd | |
| parent | 3e3d12d3f2f813e4801374ddc810ac383cc0ea5c (diff) | |
improve luarocks rule
| -rw-r--r-- | xmake/rules/luarocks/module/xmake.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/rules/luarocks/module/xmake.lua b/xmake/rules/luarocks/module/xmake.lua index e74080912..f4e910132 100644 --- a/xmake/rules/luarocks/module/xmake.lua +++ b/xmake/rules/luarocks/module/xmake.lua @@ -43,7 +43,8 @@ rule("luarocks.module") end -- export symbols - if target:is_plat("windows") then + local _, toolname = target:tool("cc") + if toolname == "cl" then local exported_name = target:name():gsub("%.", "_") exported_name = exported_name:match('^[^%-]+%-(.+)$') or exported_name target:add("shflags", "/export:luaopen_" .. exported_name, {force = true}) |
