diff options
| -rw-r--r-- | xmake/rules/c++/xmake.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/xmake/rules/c++/xmake.lua b/xmake/rules/c++/xmake.lua index e130df73b..b6e016645 100644 --- a/xmake/rules/c++/xmake.lua +++ b/xmake/rules/c++/xmake.lua @@ -22,6 +22,13 @@ rule("c.build") set_sourcekinds("cc") add_deps("c.build.pcheader", "c.build.optimization", "c.build.sanitizer") on_build_files("private.action.build.object", {batch = true, distcc = true}) + on_config(function (target) + -- https://github.com/xmake-io/xmake/issues/4621 + if target:is_plat("windows") and target:is_static() and target:has_tool("cc", "tcc") then + target:set("extensions", ".a") + target:set("prefixname", "lib") + end + end rule("c++.build") set_sourcekinds("cxx") @@ -32,6 +39,11 @@ rule("c++.build") if target:is_plat("windows") and not target:get("exceptions") then target:set("exceptions", "cxx") end + -- https://github.com/xmake-io/xmake/issues/4621 + if target:is_plat("windows") and target:is_static() and target:has_tool("cxx", "tcc") then + target:set("extensions", ".a") + target:set("prefixname", "lib") + end end) rule("c++") |
