diff options
| author | ruki <[email protected]> | 2023-08-13 20:29:34 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-08-13 20:29:34 +0800 |
| commit | fb79f4bfce306e3e12bf8ee7d4f3203d86895679 (patch) | |
| tree | 9d7aeeab403704cef3acb5f0cf6a91431844d848 /xmake/rules/c++/modules/modules_support | |
| parent | c7db3018e4e07e70628af2528a3a9210ca924d9b (diff) | |
| parent | aead298bad21a17ecadb06c96c51427092e4b600 (diff) | |
Merge pull request #4066 from xmake-io/clang
improve bmi path for clang #4063
Diffstat (limited to 'xmake/rules/c++/modules/modules_support')
| -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) |
