summaryrefslogtreecommitdiff
path: root/xmake/rules/c++/modules/modules_support/clang.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/rules/c++/modules/modules_support/clang.lua')
-rw-r--r--xmake/rules/c++/modules/modules_support/clang.lua19
1 files changed, 12 insertions, 7 deletions
diff --git a/xmake/rules/c++/modules/modules_support/clang.lua b/xmake/rules/c++/modules/modules_support/clang.lua
index 02d08e6b0..074ed331f 100644
--- a/xmake/rules/c++/modules/modules_support/clang.lua
+++ b/xmake/rules/c++/modules/modules_support/clang.lua
@@ -484,13 +484,18 @@ function build_modules_for_batchjobs(target, batchjobs, objectfiles, modules, op
if provide or common.has_module_extension(cppfile) then
local bmifile = provide and provide.bmi
- _build_modulefile(target, provide and provide.sourcefile or cppfile, {
- objectfile = objectfile,
- dependfile = target:dependfile(bmifile or objectfile),
- provide = provide and {bmifile = bmifile, name = name},
- common_args = common_args,
- requiresflags = requiresflags,
- progress = (index * 100) / total})
+ if not common.memcache():get2(name or cppfile, "compiling") then
+ if name and module.external then
+ common.memcache():set2(name or cppfile, "compiling", true)
+ end
+ _build_modulefile(target, provide and provide.sourcefile or cppfile, {
+ objectfile = objectfile,
+ dependfile = target:dependfile(bmifile or objectfile),
+ provide = provide and {bmifile = bmifile, name = name},
+ common_args = common_args,
+ requiresflags = requiresflags,
+ progress = (index * 100) / total})
+ end
target:add("objectfiles", objectfile)
if provide then