summaryrefslogtreecommitdiff
path: root/xmake/core/platform/platform.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2020-06-19 00:48:33 +0800
committerruki <[email protected]>2020-06-18 22:51:19 +0800
commit92dd2db73694ab13671db73194ab1e9fae1b9371 (patch)
tree1d4ae3f3c82999f6d67043a882d68286e8ea94b4 /xmake/core/platform/platform.lua
parent53df324acd9c7432336a5894ceef578daa1ce38d (diff)
improve the plat/arch of toolchain
Diffstat (limited to 'xmake/core/platform/platform.lua')
-rw-r--r--xmake/core/platform/platform.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/core/platform/platform.lua b/xmake/core/platform/platform.lua
index e9a66d0dc..39f88645f 100644
--- a/xmake/core/platform/platform.lua
+++ b/xmake/core/platform/platform.lua
@@ -135,7 +135,7 @@ function _instance:toolchains(opt)
-- get the given toolchain
local toolchain_given = config.get("toolchain")
if toolchain_given then
- local toolchain_inst, errors = toolchain.load(toolchain_given)
+ local toolchain_inst, errors = toolchain.load(toolchain_given, {plat = self:name()})
-- attempt to load toolchain from project
if not toolchain_inst and platform._project() then
toolchain_inst = platform._project().toolchain(toolchain_given)
@@ -154,7 +154,7 @@ function _instance:toolchains(opt)
end
if names then
for _, name in ipairs(names) do
- local toolchain_inst, errors = toolchain.load(name)
+ local toolchain_inst, errors = toolchain.load(name, {plat = self:name()})
-- attempt to load toolchain from project
if not toolchain_inst and platform._project() then
toolchain_inst = platform._project().toolchain(name)