From 5dbb7213dae2568a85bd4cbc7fcfeefc8a908fc9 Mon Sep 17 00:00:00 2001 From: ruki Date: Fri, 12 Jun 2015 13:19:19 +0800 Subject: add linkdirs and includedirs for platform --- xmake/scripts/base/linker.lua | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'xmake/scripts/base/linker.lua') diff --git a/xmake/scripts/base/linker.lua b/xmake/scripts/base/linker.lua index a521a1cbf..caddaadc4 100644 --- a/xmake/scripts/base/linker.lua +++ b/xmake/scripts/base/linker.lua @@ -149,8 +149,22 @@ function linker._addflags_from_platform(module, flags, flagname) -- check assert(module and flags and flagname) - -- done + -- add flags table.join2(flags, linker._mapflags(module, platform.get(flagname))) + + -- add the linkdirs flags + if module.flag_linkdir then + for _, linkdir in ipairs(utils.wrap(platform.get("linkdirs"))) do + table.join2(flags, module:flag_linkdir(linkdir)) + end + end + + -- add the links flags + if module.flag_link then + for _, link in ipairs(utils.wrap(platform.get("links"))) do + table.join2(flags, module:flag_link(link)) + end + end end -- add flags from the target -- cgit v1.3.1