From 57ac4f46f10e8525d4a5dec0e6c4c19f1ac35ab7 Mon Sep 17 00:00:00 2001 From: Arthur LAURENT Date: Sat, 6 Aug 2022 06:24:34 +0200 Subject: Implement module mapper file for MSVC --- xmake/rules/c++/modules/modules_support/common.lua | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'xmake/rules/c++/modules/modules_support/common.lua') diff --git a/xmake/rules/c++/modules/modules_support/common.lua b/xmake/rules/c++/modules/modules_support/common.lua index c91f52a9b..e5c8285b5 100644 --- a/xmake/rules/c++/modules/modules_support/common.lua +++ b/xmake/rules/c++/modules/modules_support/common.lua @@ -448,18 +448,19 @@ end function generate_headerunits_for_batchcmds(target, batchcmds, sourcebatch, modules, opt) -- get headerunits info - local headerunits, stl_headerunits = get_headerunits(target, sourcebatch, modules) + local user_headerunits, stl_headerunits = get_headerunits(target, sourcebatch, modules) -- generate headerunits -- build stl header units as other headerunits may need them - local headerunits_flags - if stl_headerunits then - headerunits_flags = headerunits_flags or {} + if stl_headerunits or user_headerunits then + local headerunits_flags = localcache():get("headerunits_flags") + if stl_headerunits then + modules_support(target).generate_stl_headerunits_for_batchcmds(target, batchcmds, stl_headerunits, opt) table.join2(headerunits_flags, modules_support(target).generate_stl_headerunits_for_batchcmds(target, batchcmds, stl_headerunits, opt)) - end - if headerunits then - headerunits_flags = headerunits_flags or {} - table.join2(headerunits_flags, modules_support(target).generate_user_headerunits_for_batchcmds(target, batchcmds, headerunits, opt)) + end + if user_headerunits then + modules_support(target).generate_user_headerunits_for_batchcmds(target, batchcmds, user_headerunits, opt) + end end return headerunits_flags end -- cgit v1.3.1