summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2020-05-22 22:50:44 +0800
committerruki <[email protected]>2020-05-22 11:04:24 +0800
commitadad9bc3ad159e5cf327d2058ff212c831fedcfd (patch)
tree6896dfc0a8d26e411f59cae1e6bedc396fb9d6df
parentf216efbfd66a9e72ed423d34f28c17243190ac70 (diff)
improve toolchains values
-rw-r--r--xmake/actions/config/xmake.lua7
-rw-r--r--xmake/plugins/show/showlist.lua2
2 files changed, 7 insertions, 2 deletions
diff --git a/xmake/actions/config/xmake.lua b/xmake/actions/config/xmake.lua
index 89e739e88..621037f53 100644
--- a/xmake/actions/config/xmake.lua
+++ b/xmake/actions/config/xmake.lua
@@ -158,8 +158,13 @@ task("config")
, " - run `xmake show -l toolchains` to get all toolchains"
, values = function (complete, opt)
if complete then
+ import("core.project.project")
import("core.platform.platform")
- return platform.toolchains()
+ local names = table.copy(platform.toolchains())
+ for name, _ in pairs(project.toolchains()) do
+ table.insert(names, name)
+ end
+ return names
end
end }
diff --git a/xmake/plugins/show/showlist.lua b/xmake/plugins/show/showlist.lua
index acd7e2587..7a7e90b54 100644
--- a/xmake/plugins/show/showlist.lua
+++ b/xmake/plugins/show/showlist.lua
@@ -24,7 +24,7 @@ import("core.base.text")
-- show values
function main(values)
- local tbl = {align = 'l', sep = " "}
+ local tbl = {align = 'l', sep = " "}
local row = {}
for _, value in ipairs(values) do
table.insert(row, value)