summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/rules/utils/inherit_links/inherit_links.lua3
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