diff options
| author | ruki <[email protected]> | 2023-09-29 21:03:07 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-09-29 21:03:07 +0800 |
| commit | c8f60856c4c998f3d4894524ba1576f8da43baa7 (patch) | |
| tree | e45c17277974e940922289b56df80d801de46375 /xmake/core/tool/builder.lua | |
| parent | c7486bd09c28892efa166119b94e87d005659b32 (diff) | |
improve links
Diffstat (limited to 'xmake/core/tool/builder.lua')
| -rw-r--r-- | xmake/core/tool/builder.lua | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/xmake/core/tool/builder.lua b/xmake/core/tool/builder.lua index d2ce4aca6..b8ef3a0df 100644 --- a/xmake/core/tool/builder.lua +++ b/xmake/core/tool/builder.lua @@ -502,14 +502,17 @@ function builder:_sort_links_of_items(target, items) end from = to end + local links_set = hashset.from(links) for _, linkorder in ipairs(linkorders) do local from for _, link in ipairs(linkorder) do - local to = link - if from and to then - gh:add_edge(from, to) + if links_set:has(link) then + local to = link + if from and to then + gh:add_edge(from, to) + end + from = to end - from = to end end if not gh:empty() then |
