From 704cc78dd4fa1e108f946fc51fcd538ea05d01de Mon Sep 17 00:00:00 2001 From: ruki Date: Fri, 11 Aug 2023 22:59:49 +0800 Subject: improve platform check for target toolchains --- xmake/core/platform/platform.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'xmake/core/platform/platform.lua') diff --git a/xmake/core/platform/platform.lua b/xmake/core/platform/platform.lua index 01d5b0e5e..148120d49 100644 --- a/xmake/core/platform/platform.lua +++ b/xmake/core/platform/platform.lua @@ -234,6 +234,10 @@ end -- do check function _instance:check() + local checked = self._CHECKED + if checked ~= nil then + return checked + end -- check toolchains local toolchains = self:toolchains({all = true}) @@ -256,11 +260,13 @@ function _instance:check() end end if #toolchains == 0 then + self._CHECKED = false return false, "toolchains not found!" end -- save valid toolchains config.set("__toolchains_" .. self:name() .. "_" .. self:arch(), toolchains_valid) + self._CHECKED = true return true end -- cgit v1.3.1