From 172d2c7fcd0bf09fb24d286df3d2da5b556c291b Mon Sep 17 00:00:00 2001 From: Arthur LAURENT Date: Tue, 9 Aug 2022 06:56:47 +0200 Subject: Avoid building a same header unit at the same time --- xmake/rules/c++/modules/xmake.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'xmake/rules/c++/modules/xmake.lua') diff --git a/xmake/rules/c++/modules/xmake.lua b/xmake/rules/c++/modules/xmake.lua index 23f9a0f77..05d7a76e9 100644 --- a/xmake/rules/c++/modules/xmake.lua +++ b/xmake/rules/c++/modules/xmake.lua @@ -61,10 +61,16 @@ rule("c++.build.modules.builder") import("modules_support.common") local sourcebatch = target:sourcebatches()["c++.build.modules.builder"] common.patch_sourcebatch(target, sourcebatch, opt) + + -- generate headerunits local modules = common.get_module_dependencies(target, sourcebatch, opt) batchjobs:group_enter(target:name() .. "/generate_headerunits") common.generate_headerunits_for_batchjobs(target, batchjobs, sourcebatch, modules, opt) job = batchjobs:group_leave() + + -- append module mapper flags + local cache = common.localcache():get("mapflags") or {} + target:add("cxxflags", cache, {force = true}) end return job or opt.rootjob end, {batch = true}) -- cgit v1.3.1