summaryrefslogtreecommitdiff
path: root/xmake/rules/c++/modules/modules_support/clang.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2022-08-14 11:43:00 +0800
committerruki <[email protected]>2022-08-14 11:43:00 +0800
commit7553abdc8062e4ae45604e03b05986e84221b33c (patch)
tree6059abc642e6ba76def7f366ba04414426c2cded /xmake/rules/c++/modules/modules_support/clang.lua
parent077fc878bc8da7804cf36765bf54c687dc95f61d (diff)
translate clang path
Diffstat (limited to 'xmake/rules/c++/modules/modules_support/clang.lua')
-rw-r--r--xmake/rules/c++/modules/modules_support/clang.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/xmake/rules/c++/modules/modules_support/clang.lua b/xmake/rules/c++/modules/modules_support/clang.lua
index 1a3b0ee80..fb3a2d1fa 100644
--- a/xmake/rules/c++/modules/modules_support/clang.lua
+++ b/xmake/rules/c++/modules/modules_support/clang.lua
@@ -210,7 +210,9 @@ function generate_stl_headerunits_for_batchcmds(target, batchcmds, headerunits,
-- don't build same header unit at the same time
if not common.memcache():get2(headerunit.name, "building") then
common.memcache():set2(headerunit.name, "building", true)
- local args = {modulecachepathflag .. stlcachedir, "-c", "-o", path(bmifile), "-x", "c++-system-header", headerunit.name}
+ local args = {
+ path(stlcachedir, function (p) return modulecachepathflag .. p end),
+ "-c", "-o", path(bmifile), "-x", "c++-system-header", headerunit.name}
batchcmds:show_progress(opt.progress, "${color.build.object}generating.cxx.headerunit.bmi %s", headerunit.name)
batchcmds:vrunv(compinst:program(), table.join(compinst:compflags({target = target}), args))
end
@@ -306,7 +308,7 @@ function generate_user_headerunits_for_batchcmds(target, batchcmds, headerunits,
local bmifile = (outputdir and path.join(outputdir, bmifilename) or bmifilename)
batchcmds:mkdir(path.directory(objectfile))
- local args = { modulecachepathflag .. cachedir, "-c", "-o", bmifile}
+ local args = {path(cachedir, function (p) return modulecachepathflag .. p end), "-c", "-o", path(bmifile)}
if headerunit.type == ":quote" then
table.join2(args, {"-I", path(headerunit.path):directory(), "-x", "c++-user-header", path(headerunit.path)})
elseif headerunit.type == ":angle" then
@@ -421,7 +423,7 @@ function build_modules_for_batchcmds(target, batchcmds, objectfiles, modules, op
-- build modules
local depmtime = 0
- local common_args = {modulecachepathflag .. cachedir}
+ local common_args = {path(cachedir, function (p) return modulecachepathflag .. p end)}
for _, objectfile in ipairs(objectfiles) do
local module = modules[objectfile]
if module then