From afa8d329edd2dda64ed15f29ce1498f7943b32db Mon Sep 17 00:00:00 2001 From: Arthur LAURENT Date: Fri, 16 May 2025 15:06:02 +0200 Subject: (C++ modules support) fix unitybuild, pch and c++ modules objectfiles conflicts --- xmake/rules/c++/modules/gcc/builder.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xmake/rules/c++/modules/gcc/builder.lua') diff --git a/xmake/rules/c++/modules/gcc/builder.lua b/xmake/rules/c++/modules/gcc/builder.lua index 7e207f396..54b47d41c 100644 --- a/xmake/rules/c++/modules/gcc/builder.lua +++ b/xmake/rules/c++/modules/gcc/builder.lua @@ -129,7 +129,7 @@ end function _get_maplines(target, module) local maplines = {} - if module.interface or module.implementation then + if module.name then table.insert(maplines, module.name .. " " .. path.absolute(module.bmifile)) end for dep_name, dep_module in table.orderpairs(module.deps) do @@ -223,7 +223,7 @@ function make_module_job(target, module, opt) end local flags = {"-x", "c++"} - if support.has_module_extension(module.sourcefile) or module.interface or module.implementation then + if support.has_module_extension(module.sourcefile) or module.name then if bmi then if objectfile then table.insert(flags, module_flag) @@ -270,7 +270,7 @@ function make_module_buildcmds(target, batchcmds, module, opt) end local flags = {"-x", "c++"} - if support.has_module_extension(module.sourcefile) or module.interface or module.implementation then + if support.has_module_extension(module.sourcefile) or module.name then if bmi then if objectfile then table.insert(flags, module_flag) -- cgit v1.3.1