diff options
| author | ruki <[email protected]> | 2023-08-11 22:59:49 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-08-11 22:59:49 +0800 |
| commit | 704cc78dd4fa1e108f946fc51fcd538ea05d01de (patch) | |
| tree | 32cece84ccac8ed0931566144136ee2b369cdfbb /xmake/core/platform/platform.lua | |
| parent | 793c35405c44f43ce6bdadc19f75b3f275f22367 (diff) | |
improve platform check for target toolchains
Diffstat (limited to 'xmake/core/platform/platform.lua')
| -rw-r--r-- | xmake/core/platform/platform.lua | 6 |
1 files changed, 6 insertions, 0 deletions
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 |
