summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2018-12-19 00:43:10 +0800
committerruki <[email protected]>2018-12-18 22:19:05 +0800
commitc3d983ef336403e8fe2ad0d29e2e3073e733a93e (patch)
treec6bbdde9859e2cc8573bbd0acbc3c5cd4261d27e
parent3974d32f512af461362f9c2f32893c7e67b75db8 (diff)
fix load platform bug
-rw-r--r--xmake/core/platform/platform.lua9
1 files changed, 5 insertions, 4 deletions
diff --git a/xmake/core/platform/platform.lua b/xmake/core/platform/platform.lua
index fbb4dd299..2a9c35c6b 100644
--- a/xmake/core/platform/platform.lua
+++ b/xmake/core/platform/platform.lua
@@ -94,22 +94,23 @@ end
-- get the platform os
function _instance:os()
- return self:get("os")
+ return self._INFO.os
end
-- get the platform menu
function _instance:menu()
- return self:get("menu")
+ -- @note do not use self:get("menu") to avoid loading platform early
+ return self._INFO.menu
end
-- get the platform hosts
function _instance:hosts()
- return self:get("hosts")
+ return self._INFO.hosts
end
-- get the platform archs
function _instance:archs()
- return self:get("archs")
+ return self._INFO.archs
end
-- the directories of platform