summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/rules/c++/modules/gcc/builder.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/rules/c++/modules/gcc/builder.lua b/xmake/rules/c++/modules/gcc/builder.lua
index f3c0ba471..94c35c852 100644
--- a/xmake/rules/c++/modules/gcc/builder.lua
+++ b/xmake/rules/c++/modules/gcc/builder.lua
@@ -135,7 +135,8 @@ end
--
function _generate_modulemapper_file(target, module, cppfile)
local maplines = _get_maplines(target, module)
- local mapper_path = path.join(os.tmpdir(), target:fullname():replace(" ", "_"), name or cppfile:replace(" ", "_"))
+ local mapper_path = path.join(os.tmpdir(), (target:fullname():replace(" ", "_")),
+ name or (cppfile:replace("[%s:]", "_"))) -- @see https://github.com/xmake-io/xmake/issues/6350
local mapper_content = {}
table.insert(mapper_content, "root " .. path.unix(os.projectdir()))
for _, mapline in ipairs(maplines) do