diff options
Diffstat (limited to 'xmake/rules/c++/modules/modules_support/gcc.lua')
| -rw-r--r-- | xmake/rules/c++/modules/modules_support/gcc.lua | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/xmake/rules/c++/modules/modules_support/gcc.lua b/xmake/rules/c++/modules/modules_support/gcc.lua index e99e83ae9..7f3d94dc9 100644 --- a/xmake/rules/c++/modules/modules_support/gcc.lua +++ b/xmake/rules/c++/modules/modules_support/gcc.lua @@ -167,10 +167,11 @@ function generate_stl_headerunits_for_batchcmds(target, batchcmds, headerunits, local depmtime = 0 for _, headerunit in ipairs(headerunits) do local bmifile = path.join(stlcachedir, headerunit.name .. get_bmi_extension()) - local args = { "-c", "-x", "c++-system-header", headerunit.name } - - batchcmds:show_progress(opt.progress, "${color.build.object}generating.cxx.headerunit.bmi %s", headerunit.name) - batchcmds:vrunv(compinst:program(), table.join(compinst:compflags({target = target}), args)) + if not os.isfile(bmifile) then + local args = { "-c", "-x", "c++-system-header", headerunit.name } + batchcmds:show_progress(opt.progress, "${color.build.object}generating.cxx.headerunit.bmi %s", headerunit.name) + batchcmds:vrunv(compinst:program(), table.join(compinst:compflags({target = target}), args)) + end _add_module_to_mapper(mapper_file, headerunit.path, path.absolute(bmifile, projectdir)) depmtime = math.max(depmtime, os.mtime(bmifile)) @@ -334,3 +335,7 @@ function get_depoutputflag(target) end return depoutputflag or nil end + +-- no .o generated by header units on GCC +function append_headerunits_objectfiles(target) +end
\ No newline at end of file |
