summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2021-02-25 00:33:58 +0800
committerruki <[email protected]>2021-02-25 00:33:58 +0800
commit1b934fa63f73cf2bad6f605f353b3021e601fb82 (patch)
tree31611ac683898677ea9cae192e2d01a9a11de115
parentd9c64cce4ca2e84dd3731d7f1db313cdcce6a361 (diff)
improve to remove repeat flags
-rw-r--r--xmake/core/tool/builder.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/xmake/core/tool/builder.lua b/xmake/core/tool/builder.lua
index 677bf3bea..04349dbf2 100644
--- a/xmake/core/tool/builder.lua
+++ b/xmake/core/tool/builder.lua
@@ -372,9 +372,10 @@ function builder:_preprocess_flags(flags)
local flags_new = {}
for idx = count, 1, -1 do
local flag = flags[idx]
- if flag and not unique[flag] then
+ local flagkey = type(flag) == "table" and table.concat(flag, "") or flag
+ if flag and not unique[flagkey] then
table.insert(flags_new, flag)
- unique[flag] = true
+ unique[flagkey] = true
end
end
flags = flags_new