summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur LAURENT <[email protected]>2022-12-08 23:07:23 +0100
committerArthur LAURENT <[email protected]>2022-12-08 23:18:41 +0100
commit38cf5c22ae903f925442f5f6c988a39fa3ddd6a2 (patch)
tree91dfa0219a0211674957f3c9656ec027398ae304
parente7bceed74d12df7909e7f5870e4544789539c0d8 (diff)
cleanup clang module code
-rw-r--r--xmake/rules/c++/modules/modules_support/clang.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/rules/c++/modules/modules_support/clang.lua b/xmake/rules/c++/modules/modules_support/clang.lua
index 883a50e85..0625b1f68 100644
--- a/xmake/rules/c++/modules/modules_support/clang.lua
+++ b/xmake/rules/c++/modules/modules_support/clang.lua
@@ -149,6 +149,7 @@ function _build_modulefile(target, sourcefile, opt)
return
end
+ -- init flags
local common_args = opt.common_args
local requiresflags = opt.requiresflags
@@ -163,7 +164,7 @@ function _build_modulefile(target, sourcefile, opt)
vprint(compinst:compcmd(sourcefile, bmifile, {compflags = bmiflags, rawargs = true}))
end
- local objflags = table.join(compflags, common_args, requiresflags or {})
+ local objflags = table.join(compflags, common_args, requiresflags or {}, (bmifile == nil) and {"-x", "c++"} or {})
vprint(compinst:compcmd(bmifile or sourcefile, objectfile, {compflags = objflags, rawargs = true}))
if not dryrun then