summaryrefslogtreecommitdiff
path: root/xmake/core/tool/compiler.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/core/tool/compiler.lua')
-rw-r--r--xmake/core/tool/compiler.lua2
1 files changed, 1 insertions, 1 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