summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2020-03-14 00:40:50 +0800
committerruki <[email protected]>2020-03-13 22:05:04 +0800
commit2754f0e04afc5de4c31ddf15b5d616a480ca9fcb (patch)
tree8c05496fbf78a4ac2e94e2cf2c7b0858406bb4ca
parenta23b2000a2675f005b6a60b3c2bd0a5917970fb8 (diff)
fix build object for batch
-rw-r--r--xmake/modules/private/action/build/object.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/xmake/modules/private/action/build/object.lua b/xmake/modules/private/action/build/object.lua
index ab1e96a40..982789220 100644
--- a/xmake/modules/private/action/build/object.lua
+++ b/xmake/modules/private/action/build/object.lua
@@ -107,12 +107,12 @@ function main(target, batchjobs, sourcebatch, opt)
local rootjob = opt.rootjob
for i = 1, #sourcebatch.sourcefiles do
local sourcefile = sourcebatch.sourcefiles[i]
- opt.objectfile = sourcebatch.objectfiles[i]
- opt.dependfile = sourcebatch.dependfiles[i]
- opt.sourcekind = assert(sourcebatch.sourcekind, "%s: sourcekind not found!", sourcefile)
+ local objectfile = sourcebatch.objectfiles[i]
+ local dependfile = sourcebatch.dependfiles[i]
+ local sourcekind = assert(sourcebatch.sourcekind, "%s: sourcekind not found!", sourcefile)
batchjobs:addjob(sourcefile, function (index, total)
- opt.progress = (index * 100) / total
- _build_object(target, sourcefile, opt)
+ local build_opt = table.join({objectfile = objectfile, dependfile = dependfile, sourcekind = sourcekind, progress = (index * 100) / total}, opt)
+ _build_object(target, sourcefile, build_opt)
end, rootjob)
end
end