From 5c8d2277d8a3500a2078cf488c49c3c167349717 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 26 May 2020 00:39:32 +0800 Subject: fix load tool --- xmake/core/tool/compiler.lua | 2 +- xmake/core/tool/linker.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xmake/core/tool/compiler.lua b/xmake/core/tool/compiler.lua index 1f0d7d6d6..8d6db1da8 100644 --- a/xmake/core/tool/compiler.lua +++ b/xmake/core/tool/compiler.lua @@ -72,7 +72,7 @@ function compiler._load_tool(sourcekind, target) -- get program from target local program, toolname - if target then + if target and target:type() == "target" then program, toolname = target:tool(sourcekind) end diff --git a/xmake/core/tool/linker.lua b/xmake/core/tool/linker.lua index bbb088e7c..9a6141f03 100644 --- a/xmake/core/tool/linker.lua +++ b/xmake/core/tool/linker.lua @@ -79,7 +79,7 @@ function linker._load_tool(targetkind, sourcekinds, target) -- get program from target local program, toolname - if target then + if target and target:type() == "target" then program, toolname = target:tool(_linkerinfo.linkerkind) end -- cgit v1.3.1