summaryrefslogtreecommitdiff
path: root/xmake/rules/c++/modules/gcc.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2021-10-15 22:37:38 +0800
committerruki <[email protected]>2021-10-15 22:37:38 +0800
commitfcc6bfb7b12634df1783ade4ecbcbb0a88ad1f80 (patch)
tree3efb1ea29095b7f797c43e6b5a1d81166c4ee3fd /xmake/rules/c++/modules/gcc.lua
parent6cd055242dad6d0697f340f0cdc6b8f56e63df12 (diff)
improve c++ modules for clang
Diffstat (limited to 'xmake/rules/c++/modules/gcc.lua')
-rw-r--r--xmake/rules/c++/modules/gcc.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/xmake/rules/c++/modules/gcc.lua b/xmake/rules/c++/modules/gcc.lua
index cd1dac970..d5ffbc57b 100644
--- a/xmake/rules/c++/modules/gcc.lua
+++ b/xmake/rules/c++/modules/gcc.lua
@@ -48,16 +48,16 @@ function build_with_batchjobs(target, batchjobs, sourcebatch, opt)
for i = 1, #sourcebatch.sourcefiles do
local sourcefile = sourcebatch.sourcefiles[i]
batchjobs:addjob(sourcefile, function (index, total)
- opt = table.join(opt, {configs = {force = {cxxflags = {modulesflag, "-x c++"}}}})
- opt.progress = (index * 100) / total
- opt.objectfile = sourcebatch.objectfiles[i]
- opt.dependfile = sourcebatch.dependfiles[i]
- opt.sourcekind = assert(sourcebatch.sourcekind, "%s: sourcekind not found!", sourcefile)
- objectbuilder.build_object(target, sourcefile, opt)
+ local opt2 = table.join(opt, {configs = {force = {cxxflags = {"-x c++"}}}})
+ opt2.progress = (index * 100) / total
+ opt2.objectfile = sourcebatch.objectfiles[i]
+ opt2.dependfile = sourcebatch.dependfiles[i]
+ opt2.sourcekind = assert(sourcebatch.sourcekind, "%s: sourcekind not found!", sourcefile)
+ objectbuilder.build_object(target, sourcefile, opt2)
end, {rootjob = rootjob})
end
- -- add module files
+ -- add module flags
target:add("cxxflags", modulesflag)
end