summaryrefslogtreecommitdiff
path: root/xmake/rules/c++/modules
diff options
context:
space:
mode:
authorÂngelo Andrade Cirino <[email protected]>2021-07-15 11:19:54 -0300
committerÂngelo Andrade Cirino <[email protected]>2021-07-15 11:19:54 -0300
commit942c32f448d9b8a850438aa2af1de2415b7ae872 (patch)
treef1731f00a311cf9e1b91e10a81476adf8d5dde1d /xmake/rules/c++/modules
parent880eeb4bc1633eccb52d4df19404441f6076d770 (diff)
Better toolname conditionals and modulesflag shouldn't be initialized
Diffstat (limited to 'xmake/rules/c++/modules')
-rw-r--r--xmake/rules/c++/modules/build_modulefiles.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/rules/c++/modules/build_modulefiles.lua b/xmake/rules/c++/modules/build_modulefiles.lua
index 99b5aeaaa..4e26f1eca 100644
--- a/xmake/rules/c++/modules/build_modulefiles.lua
+++ b/xmake/rules/c++/modules/build_modulefiles.lua
@@ -124,10 +124,10 @@ end
function main(target, sourcebatch, opt)
-- do compile
- local modulesflag = "-fmodules"
+ local modulesflag = nil
local _, toolname = target:tool("cxx")
local compinst = compiler.load("cxx")
- if toolname == "clang" or toolname == "gcc" then
+ if toolname:find("clang", 1, true) or toolname:find("gcc", 1, true) then
if compinst:has_flags("-fmodules") then
modulesflag = "-fmodules"
elseif compinst:has_flags("-fmodules-ts") then