summaryrefslogtreecommitdiff
path: root/xmake/rules/c++/modules/modules_support/clang.lua
diff options
context:
space:
mode:
authorArthur LAURENT <[email protected]>2023-01-06 21:42:35 +0100
committerArthur LAURENT <[email protected]>2023-01-12 14:56:28 +0100
commitedd02c990ac8ca4f3ff52c9e630b2f328ebd11b3 (patch)
tree6b165ba981fa1d1dd1665300a953ddac740c5ede /xmake/rules/c++/modules/modules_support/clang.lua
parentb81beba7f7b6b77e3442748138c7c636c2f7d519 (diff)
improve gcc module compflags
Diffstat (limited to 'xmake/rules/c++/modules/modules_support/clang.lua')
-rw-r--r--xmake/rules/c++/modules/modules_support/clang.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/rules/c++/modules/modules_support/clang.lua b/xmake/rules/c++/modules/modules_support/clang.lua
index 4c1dfeae5..d0a60cb30 100644
--- a/xmake/rules/c++/modules/modules_support/clang.lua
+++ b/xmake/rules/c++/modules/modules_support/clang.lua
@@ -255,7 +255,7 @@ function generate_dependencies(target, sourcebatch, opt)
local compflags = compinst:compflags({sourcefile = file, target = target})
local flags = {}
for _, flag in pairs(compflags) do
- if flag:startswith("-stdlib") or flag:startswith("-f") or flag:startswith("-D") or flag:startswith("-U") or flag:startswith("-I") or flag:startswith("-isystem") then
+ if flag:startswith("-stdlib") or (flag:startswith("-f") and not flag:startswith("-fmodules")) or flag:startswith("-D") or flag:startswith("-U") or flag:startswith("-I") or flag:startswith("-isystem") then
table.append(flags, flag)
end
end