summaryrefslogtreecommitdiff
path: root/xmake/rules/c++/xmake.lua
diff options
context:
space:
mode:
authorChristian Rendina <[email protected]>2025-04-10 09:50:37 +0200
committerChristian Rendina <[email protected]>2025-04-10 09:50:37 +0200
commit78723913d76fb8b615df34541236b8ea588d30db (patch)
treeb6b6ff550e4a2f73d94c63a61876cec31a4b3ae3 /xmake/rules/c++/xmake.lua
parent2051c13f735a626f7b6fd8b98aa69f01fd9cef7e (diff)
parentfd49b7754c6709a87b5beb5526788bbc1a663965 (diff)
Merge branch 'dev' of https://github.com/xmake-io/xmake into dev
Diffstat (limited to 'xmake/rules/c++/xmake.lua')
-rw-r--r--xmake/rules/c++/xmake.lua24
1 files changed, 2 insertions, 22 deletions
diff --git a/xmake/rules/c++/xmake.lua b/xmake/rules/c++/xmake.lua
index 94bba431e..e04cd5140 100644
--- a/xmake/rules/c++/xmake.lua
+++ b/xmake/rules/c++/xmake.lua
@@ -21,18 +21,8 @@
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_build_files("private.action.build.object", {jobgraph = true, batch = true, distcc = true})
on_config(function (target)
- -- enable vs runtime as MD by default
- if target:is_plat("windows") and not target:get("runtimes") then
- local vs_runtime_default = target:policy("build.c++.msvc.runtime")
- if vs_runtime_default and target:has_tool("cc", "cl", "clang_cl") then
- if is_mode("debug") then
- vs_runtime_default = vs_runtime_default .. "d"
- end
- target:set("runtimes", vs_runtime_default)
- end
- end
-- 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("extension", ".a")
@@ -43,22 +33,12 @@ rule("c.build")
rule("c++.build")
set_sourcekinds("cxx")
add_deps("c++.build.pcheader", "c++.build.modules", "c++.build.optimization", "c++.build.sanitizer")
- on_build_files("private.action.build.object", {batch = true, distcc = true})
+ on_build_files("private.action.build.object", {jobgraph = true, batch = true, distcc = true})
on_config(function (target)
-- enable c++ exceptions by default
if target:is_plat("windows") and not target:get("exceptions") then
target:set("exceptions", "cxx")
end
- -- enable vs runtime as MD by default
- if target:is_plat("windows") and not target:get("runtimes") then
- local vs_runtime_default = target:policy("build.c++.msvc.runtime")
- if vs_runtime_default and target:has_tool("cxx", "cl", "clang_cl") then
- if is_mode("debug") then
- vs_runtime_default = vs_runtime_default .. "d"
- end
- target:set("runtimes", vs_runtime_default)
- end
- 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("extension", ".a")