summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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