From c23ce9db49735751f93dfb224f226ca120d69373 Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 30 Nov 2020 22:45:39 +0800 Subject: fix link order --- xmake/rules/utils/inherit_links/inherit_links.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- cgit v1.3.1