diff options
| author | ruki <[email protected]> | 2020-06-13 15:38:34 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-06-13 15:38:34 +0800 |
| commit | be93ad0bc06e9913ebdd83fdc00b4a3eec87be84 (patch) | |
| tree | c495879e01a7455c948c033bda681e3cac65a87c /xmake/actions | |
| parent | d1f1fd32aeddf73071b06fbcab23856925a0017f (diff) | |
fix before_build for across_targets_in_parallel/false
Diffstat (limited to 'xmake/actions')
| -rw-r--r-- | xmake/actions/build/build.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/xmake/actions/build/build.lua b/xmake/actions/build/build.lua index 07a958482..ae68fd1a3 100644 --- a/xmake/actions/build/build.lua +++ b/xmake/actions/build/build.lua @@ -131,7 +131,7 @@ function _add_batchjobs_for_target(batchjobs, rootjob, target) local job_build, job_build_leaf = _add_batchjobs(batchjobs, job_after_build, target) -- add before_build job for target - batchjobs:addjob(target:name() .. "/before_build", function (index, total) + local job_build_before = batchjobs:addjob(target:name() .. "/before_build", function (index, total) -- enter the environments of the target packages for name, values in pairs(target:pkgenvs()) do @@ -157,7 +157,9 @@ function _add_batchjobs_for_target(batchjobs, rootjob, target) end end end, job_build_leaf) - return job_build, job_after_build + + -- we need do build_before after all dependent targets if across_targets_in_parallel is disabled + return target:policy("build.across_targets_in_parallel") == false and job_build_before or job_build, job_after_build end -- add batch jobs for the given target and deps |
