summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2017-10-10 22:30:58 +0800
committerruki <[email protected]>2017-10-10 09:05:52 +0800
commit04daf89d3f76d473de14878d0c19b35267993663 (patch)
tree5df4849958ff4a31dd48002aa6ee202d142c6aeb
parent6a282c696b0d14b894b19c3c6df9f1431c70ea51 (diff)
fix archs menu
-rw-r--r--xmake/actions/config/xmake.lua9
-rw-r--r--xmake/core/sandbox/modules/import/core/platform/platform.lua8
2 files changed, 7 insertions, 10 deletions
diff --git a/xmake/actions/config/xmake.lua b/xmake/actions/config/xmake.lua
index 7b7e6523a..3bae7c543 100644
--- a/xmake/actions/config/xmake.lua
+++ b/xmake/actions/config/xmake.lua
@@ -79,9 +79,12 @@ task("config")
-- make description
local description = {}
for i, plat in ipairs(platform.plats()) do
- description[i] = " - " .. plat .. ":"
- for _, arch in ipairs(platform.archs(plat)) do
- description[i] = description[i] .. " " .. arch
+ local archs = platform.archs(plat)
+ if archs then
+ description[i] = " - " .. plat .. ":"
+ for _, arch in ipairs(archs) do
+ description[i] = description[i] .. " " .. arch
+ end
end
end
diff --git a/xmake/core/sandbox/modules/import/core/platform/platform.lua b/xmake/core/sandbox/modules/import/core/platform/platform.lua
index 4421947a4..49e96aa8b 100644
--- a/xmake/core/sandbox/modules/import/core/platform/platform.lua
+++ b/xmake/core/sandbox/modules/import/core/platform/platform.lua
@@ -52,13 +52,7 @@ end
-- get the all architectures for the given platform
function sandbox_core_platform.archs(plat)
-
- -- get it
- local archs = platform.archs(plat)
- assert(archs)
-
- -- ok
- return archs
+ return platform.archs(plat)
end
-- get the current platform configure