summaryrefslogtreecommitdiff
path: root/xmake/rules/c++/modules/clang/support.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/rules/c++/modules/clang/support.lua')
-rw-r--r--xmake/rules/c++/modules/clang/support.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/xmake/rules/c++/modules/clang/support.lua b/xmake/rules/c++/modules/clang/support.lua
index 07f39e35d..c1684a1b9 100644
--- a/xmake/rules/c++/modules/clang/support.lua
+++ b/xmake/rules/c++/modules/clang/support.lua
@@ -347,6 +347,20 @@ function get_moduleheaderflag(target)
return moduleheaderflag or nil
end
+function get_modulesreducedbmiflag(target)
+ local modulesreducedbmiflag = _g.modulesreducedbmiflag
+ if modulesreducedbmiflag == nil then
+ local compinst = target:compiler("cxx")
+ if compinst:has_flags("-fmodules-reduced-bmi", "cxxflags", {flagskey = "clang_modules_reduced_bmi"}) then
+ modulesreducedbmiflag = "-fmodules-reduced-bmi"
+ elseif compinst:has_flags("-fexperimental-modules-reduced-bmi", "cxxflags", {flagskey = "clang_modules_reduced_bmi"}) then
+ modulesreducedbmiflag = "-fexperimental-modules-reduced-bmi"
+ end
+ _g.modulesreducedbmiflag = modulesreducedbmiflag or false
+ end
+ return modulesreducedbmiflag or nil
+end
+
function has_clangscandepssupport(target)
local support_clangscandeps = _g.support_clangscandeps
if support_clangscandeps == nil then