diff options
| author | ruki <[email protected]> | 2020-05-22 22:49:44 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-05-22 10:58:29 +0800 |
| commit | 9a3ccbc46480462a7d2a702c8c635af17cd85249 (patch) | |
| tree | 19595fb3fc9235ed2deec008edcee470652957de /xmake/core/tool/toolchain.lua | |
| parent | b1df391694245eb0f1555b3855fad3faee0d2a82 (diff) | |
load toolchain from project
Diffstat (limited to 'xmake/core/tool/toolchain.lua')
| -rw-r--r-- | xmake/core/tool/toolchain.lua | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/xmake/core/tool/toolchain.lua b/xmake/core/tool/toolchain.lua index dd682d3b2..e2220127e 100644 --- a/xmake/core/tool/toolchain.lua +++ b/xmake/core/tool/toolchain.lua @@ -139,7 +139,7 @@ function _instance:sdkdir() return config.get("sdk") or self:get("sdkdir") end --- do load +-- do load, @note we need load it repeatly for each architectures function _instance:_load() local info = self:info() if not info:get("__loaded") and not info:get("__loading") then @@ -156,11 +156,10 @@ function _instance:_load() end end --- do check +-- do check, we only check it once for all architectures function _instance:check() local checkok = true - local info = self:info() - if not info:get("__checked") then + if not self._CHECKED then local on_check = self:info():get("check") if on_check then local ok, results_or_errors = sandbox.load(on_check, self) @@ -170,7 +169,7 @@ function _instance:check() os.raise(results_or_errors) end end - info:set("__checked", true) + self._CHECKED = true end return checkok end |
