diff options
| author | ruki <[email protected]> | 2025-08-19 22:51:43 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-08-19 22:51:43 +0800 |
| commit | a115f760c346a010a6633e230dcb57b4ce0f2df0 (patch) | |
| tree | f704d1b2b31492a7c9a0dee5b6289b3c50bed2fa | |
| parent | 8a7b5215e90e944246366197e4fa01bc927dd57a (diff) | |
add dep_fence
| -rw-r--r-- | xmake/core/sandbox/modules/import/core/project/project.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/private/action/build/target.lua | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/xmake/core/sandbox/modules/import/core/project/project.lua b/xmake/core/sandbox/modules/import/core/project/project.lua index 2fdce5948..af1ae11bd 100644 --- a/xmake/core/sandbox/modules/import/core/project/project.lua +++ b/xmake/core/sandbox/modules/import/core/project/project.lua @@ -142,7 +142,7 @@ function sandbox_core_project._config_targets(opt) -- we need to config all targets (contains non-default targets) local targets_root = target_buildutils.get_root_targets(nil, {all = true}) - target_buildutils.run_targetjobs(targets_root, {job_kind = "config", job_opt = opt}) + target_buildutils.run_targetjobs(targets_root, {job_kind = "config", dep_fence = true, job_opt = opt}) end -- load rules in the required packages for target diff --git a/xmake/modules/private/action/build/target.lua b/xmake/modules/private/action/build/target.lua index e3c4febb1..444dfc18e 100644 --- a/xmake/modules/private/action/build/target.lua +++ b/xmake/modules/private/action/build/target.lua @@ -115,7 +115,8 @@ end function _add_targetjobs_deep_orders(jobgraph, target, dep, opt) local jobname, jobname_dep local job_kind = opt.job_kind - if job_kind == "config" or dep:policy("build.fence") or dep:policy("build.across_targets_in_parallel") == false then + local dep_fence = opt.dep_fence or dep:policy("build.fence") or dep:policy("build.across_targets_in_parallel") == false + if dep_fence then jobname = string.format("%s/begin_%s", target:fullname(), job_kind) jobname_dep = string.format("%s/end_%s", dep:fullname(), job_kind) -- build.across_targets_in_parallel is deprecated |
