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