summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-03-22 23:40:11 +0800
committerruki <[email protected]>2024-03-22 23:40:11 +0800
commita179acd1f474be6821c31cf203964ce41b0177a1 (patch)
treef0983ddb4d8823f2770e66af7abd5d2397c5fecb
parent373ac0e15b800c179896f6e677619553cf426aa0 (diff)
add check tips
-rw-r--r--xmake/core/tool/toolchain.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/xmake/core/tool/toolchain.lua b/xmake/core/tool/toolchain.lua
index be4e82810..ea0e9d580 100644
--- a/xmake/core/tool/toolchain.lua
+++ b/xmake/core/tool/toolchain.lua
@@ -208,6 +208,9 @@ end
-- get the program and name of the given tool kind
function _instance:tool(toolkind)
+ if not self._CHECKED then
+ os.raise("we cannot get tool(%s) in toolchain(%s), it's not checked", toolkind, self:name())
+ end
-- ensure to do load for initializing toolset first
-- @note we cannot call self:check() here, because it can only be called on config
self:_load()