summaryrefslogtreecommitdiff
path: root/xmake/rules/c++/modules/modules_support/clang.lua
diff options
context:
space:
mode:
authorArthur LAURENT <[email protected]>2023-01-23 11:58:45 +0100
committerArthur LAURENT <[email protected]>2023-01-23 11:58:45 +0100
commitacedc8854cdf5e59915bfcf6fc1e979b91ff4d6b (patch)
treeeada536d0080da7d63cfe7774b7a1452cf9a9eb6 /xmake/rules/c++/modules/modules_support/clang.lua
parent1294b1fa8b7022c711f148de258756794cf8ae66 (diff)
format
Diffstat (limited to 'xmake/rules/c++/modules/modules_support/clang.lua')
-rw-r--r--xmake/rules/c++/modules/modules_support/clang.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/xmake/rules/c++/modules/modules_support/clang.lua b/xmake/rules/c++/modules/modules_support/clang.lua
index e84848cc3..b341df0d4 100644
--- a/xmake/rules/c++/modules/modules_support/clang.lua
+++ b/xmake/rules/c++/modules/modules_support/clang.lua
@@ -274,8 +274,10 @@ function generate_dependencies(target, sourcebatch, opt)
local compflags = compinst:compflags({sourcefile = file, target = target})
local flags = {}
local next_flag = false
- for _, flag in pairs(compflags) do
- if flag == "-m64" or flag == "-g" or flag:startswith("-stdlib") or flag:startswith("-m") or (flag:startswith("-f") and not flag:startswith("-fmodule") and not flag:startswith("-fno-implicit-module-maps")) or flag:startswith("-D") or flag:startswith("-U") or flag:startswith("-I") or flag:startswith("-isystem") or next_flag then
+ for _, flag in ipairs(compflags) do
+ if flag == "-m64" or flag == "-g" or flag:startswith("-stdlib") or flag:startswith("-m") or
+ (flag:startswith("-f") and not flag:startswith("-fmodule") and not flag:startswith("-fno-implicit-module-maps")) or
+ flag:startswith("-D") or flag:startswith("-U") or flag:startswith("-I") or flag:startswith("-isystem") or next_flag then
table.insert(flags, flag)
next_flag = false
if flag:startswith("-isystem") then