Build stl header units only when not present and add dummy append_headerunits_objectfiles function
@@ -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())
+ 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
