From 04daf89d3f76d473de14878d0c19b35267993663 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 10 Oct 2017 22:30:58 +0800 Subject: fix archs menu --- xmake/actions/config/xmake.lua | 9 ++++++--- xmake/core/sandbox/modules/import/core/platform/platform.lua | 8 +------- 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 -- cgit v1.3.1