summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2020-05-20 23:49:37 +0800
committerruki <[email protected]>2020-05-20 16:57:45 +0800
commitc6d413d07d771ed199b1b4d747625a6a7059fdca (patch)
tree2442e7d5befd8bc15448ea24a83f1fc1f87075d9
parent6a2e838a6fb0a5cb957766aa2f11f94f65f73f43 (diff)
fix load toolchain
-rw-r--r--xmake/core/tool/toolchain.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/xmake/core/tool/toolchain.lua b/xmake/core/tool/toolchain.lua
index 97fb512a1..368a25b20 100644
--- a/xmake/core/tool/toolchain.lua
+++ b/xmake/core/tool/toolchain.lua
@@ -115,10 +115,12 @@ end
-- do load
function _instance:_load()
- if not self._LOADED then
+ if not self._LOADED and not self._LOADING then
local on_load = self._INFO:get("load")
if on_load then
+ self._LOADING = true
local ok, errors = sandbox.load(on_load, self)
+ self._LOADING = false
if not ok then
os.raise(errors)
end