summaryrefslogtreecommitdiff
path: root/xmake/modules/private/action/build/object.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2020-03-08 15:18:13 +0800
committerruki <[email protected]>2020-03-08 15:18:13 +0800
commit82a72523912a398f367d4b19cf550ad8aaa1c8be (patch)
tree7984209a7faabfe0db33627283ae46b2c4138a83 /xmake/modules/private/action/build/object.lua
parent757ab49a3eb245163080dbc59f8f95f35ee47c9a (diff)
add jobpool
Diffstat (limited to 'xmake/modules/private/action/build/object.lua')
-rw-r--r--xmake/modules/private/action/build/object.lua8
1 files changed, 1 insertions, 7 deletions
diff --git a/xmake/modules/private/action/build/object.lua b/xmake/modules/private/action/build/object.lua
index f439f0f37..0de2729f6 100644
--- a/xmake/modules/private/action/build/object.lua
+++ b/xmake/modules/private/action/build/object.lua
@@ -92,14 +92,8 @@ function _build_object(target, sourcebatch, index, opt)
local dependfile = sourcebatch.dependfiles[index]
local sourcekind = assert(sourcebatch.sourcekind, "%s: sourcekind not found!", sourcefile)
- -- get progress range
- local progress = assert(opt.progress, "no progress!")
-
- -- calculate progress
- local progress_now = progress.start + ((index - 1) * (progress.stop - progress.start)) / #sourcebatch.sourcefiles
-
-- init build option
- local opt = table.join(opt, {objectfile = objectfile, dependfile = dependfile, sourcekind = sourcekind, progress = progress_now})
+ local opt = table.join(opt, {objectfile = objectfile, dependfile = dependfile, sourcekind = sourcekind, progress = opt.progress})
-- do before build
local before_build_file = target:script("build_file_before")