diff options
| author | ruki <[email protected]> | 2021-02-25 00:33:58 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-02-25 00:33:58 +0800 |
| commit | 1b934fa63f73cf2bad6f605f353b3021e601fb82 (patch) | |
| tree | 31611ac683898677ea9cae192e2d01a9a11de115 | |
| parent | d9c64cce4ca2e84dd3731d7f1db313cdcce6a361 (diff) | |
improve to remove repeat flags
| -rw-r--r-- | xmake/core/tool/builder.lua | 5 |
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 |
