diff options
| author | ruki <[email protected]> | 2020-11-30 22:45:39 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-11-30 22:45:39 +0800 |
| commit | c23ce9db49735751f93dfb224f226ca120d69373 (patch) | |
| tree | ac50d706ca31299738dacf00e804287b78c9f3ff | |
| parent | b27f50fd2354d4ab0ee8a569ef157719305459fe (diff) | |
fix link order
| -rw-r--r-- | xmake/rules/utils/inherit_links/inherit_links.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/rules/utils/inherit_links/inherit_links.lua b/xmake/rules/utils/inherit_links/inherit_links.lua index eb71afc5d..07fcb7d19 100644 --- a/xmake/rules/utils/inherit_links/inherit_links.lua +++ b/xmake/rules/utils/inherit_links/inherit_links.lua @@ -38,7 +38,8 @@ function main(target) local targetkind = target:targetkind() if targetkind == "shared" or targetkind == "static" then local targetfile = target:targetfile() - target:add("links", target:basename(), {interface = true}) + local links = target:get("links", {interface = true}) + target:set("links", table.join(target:basename(), links), {interface = true}) -- we need move target link to head target:add("linkdirs", path.directory(targetfile), {interface = true}) if target:rule("go") then -- we need add includedirs to support import modules for golang |
