diff options
| -rw-r--r-- | xmake/rules/c++/modules/modules_support/clang.lua | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/xmake/rules/c++/modules/modules_support/clang.lua b/xmake/rules/c++/modules/modules_support/clang.lua index d43d8d401..c3f40d542 100644 --- a/xmake/rules/c++/modules/modules_support/clang.lua +++ b/xmake/rules/c++/modules/modules_support/clang.lua @@ -32,6 +32,15 @@ import("private.action.build.object", {alias = "objectbuilder"}) import("common") import("stl_headers") +-- get bmi path +-- @see https://github.com/xmake-io/xmake/issues/4063 +function _get_bmi_path(bmifile) + if is_host("windows") then + bmifile = bmifile:gsub(":", "_") + end + return bmifile +end + -- get clang path function _get_clang_path(target) local clang_path = _g.clang_path @@ -260,7 +269,7 @@ function _build_modulefile(target, sourcefile, opt) local compileflags = {} local bmiflags if opt.provide then - bmifile = opt.provide.bmifile + bmifile = _get_bmi_path(opt.provide.bmifile) if moduleoutputflag then compileflags = table.join("-x", "c++-module", moduleoutputflag .. bmifile, requiresflags) else @@ -622,7 +631,7 @@ function build_modules_for_batchjobs(target, batchjobs, objectfiles, modules, op end if provide or common.has_module_extension(cppfile) then - local bmifile = provide and provide.bmi + local bmifile = _get_bmi_path(provide and provide.bmi) if not common.memcache():get2(name or cppfile, "compiling") then if name and module.external then common.memcache():set2(name or cppfile, "compiling", true) |
