summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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