summaryrefslogtreecommitdiff
path: root/xmake/rules
diff options
context:
space:
mode:
authorruki <[email protected]>2025-04-07 22:36:14 +0800
committerruki <[email protected]>2025-04-08 15:31:58 +0800
commitc091d7b4d8f13ed4b17d23df8867ec30e8003c4c (patch)
tree90e7222f3b0fd527c21ded0f7d4f70298c40ea9f /xmake/rules
parent72870df34c9a3278fe4a92fa5591f6738f80ada6 (diff)
remove across_targets_in_parallel policy
Diffstat (limited to 'xmake/rules')
-rw-r--r--xmake/rules/c++/modules/xmake.lua2
-rw-r--r--xmake/rules/fortran/xmake.lua2
-rw-r--r--xmake/rules/go/xmake.lua2
-rw-r--r--xmake/rules/vala/xmake.lua2
-rw-r--r--xmake/rules/xcode/application/xmake.lua13
5 files changed, 4 insertions, 17 deletions
diff --git a/xmake/rules/c++/modules/xmake.lua b/xmake/rules/c++/modules/xmake.lua
index d0c0e0387..a27633182 100644
--- a/xmake/rules/c++/modules/xmake.lua
+++ b/xmake/rules/c++/modules/xmake.lua
@@ -37,7 +37,7 @@ rule("c++.build.modules")
-- even if some sub-targets do not contain C++ modules.
--
-- maybe we will have a more fine-grained configuration strategy to disable it in the future.
- target:set("policy", "build.across_targets_in_parallel", false)
+ target:set("policy", "build.fence", true)
-- disable ccache for this target
--
diff --git a/xmake/rules/fortran/xmake.lua b/xmake/rules/fortran/xmake.lua
index 4ab11906d..d10993a91 100644
--- a/xmake/rules/fortran/xmake.lua
+++ b/xmake/rules/fortran/xmake.lua
@@ -35,7 +35,7 @@ rule("fortran.build")
add_deps("fortran.build.modules")
on_load(function (target)
-- we disable to build across targets in parallel, because the source files may depend on other target modules
- target:set("policy", "build.across_targets_in_parallel", false)
+ target:set("policy", "build.fence", true)
end)
on_build_files(function (target, sourcebatch, opt)
import("private.action.build.object").build(target, sourcebatch, opt)
diff --git a/xmake/rules/go/xmake.lua b/xmake/rules/go/xmake.lua
index 58890e260..fd4cdfb4a 100644
--- a/xmake/rules/go/xmake.lua
+++ b/xmake/rules/go/xmake.lua
@@ -23,7 +23,7 @@ rule("go.build")
add_deps("go.env")
on_load(function (target)
-- we disable to build across targets in parallel, because the source files may depend on other target modules
- target:set("policy", "build.across_targets_in_parallel", false)
+ target:set("policy", "build.fence", true)
-- xxx.a
if target:is_static() then
target:set("prefixname", "")
diff --git a/xmake/rules/vala/xmake.lua b/xmake/rules/vala/xmake.lua
index caebab9d8..e2262a9ec 100644
--- a/xmake/rules/vala/xmake.lua
+++ b/xmake/rules/vala/xmake.lua
@@ -26,7 +26,7 @@ rule("vala.build")
set_sourcekinds("cc")
on_load(function (target)
-- we disable to build across targets in parallel, because the source files may depend on other target modules
- target:set("policy", "build.across_targets_in_parallel", false)
+ target:set("policy", "build.fence", true)
-- get vapi file
local vapifile = target:data("vala.vapifile")
diff --git a/xmake/rules/xcode/application/xmake.lua b/xmake/rules/xcode/application/xmake.lua
index b4969b3df..7d5edc668 100644
--- a/xmake/rules/xcode/application/xmake.lua
+++ b/xmake/rules/xcode/application/xmake.lua
@@ -27,19 +27,6 @@ rule("xcode.application")
-- we must set kind before target.on_load(), may we will use target in on_load()
on_load("load")
- -- depend xcode.framework? we need to disable `build.across_targets_in_parallel` policy
- after_load(function (target)
- local across_targets_in_parallel
- for _, dep in ipairs(target:orderdeps()) do
- if dep:rule("xcode.framework") then
- across_targets_in_parallel = false
- end
- end
- if across_targets_in_parallel ~= nil then
- target:set("policy", "build.across_targets_in_parallel", across_targets_in_parallel)
- end
- end)
-
-- build *.app
after_build("build")