summaryrefslogtreecommitdiff
path: root/xmake/core/platform/platform.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2024-09-21 00:56:56 +0800
committerruki <[email protected]>2024-09-23 09:43:53 +0800
commit7af1ca50e38a7cf21048be7a62bd30103421cceb (patch)
treeaeb13deca5fcab0a43554fe120d3091a52e5637c /xmake/core/platform/platform.lua
parent4fd8d5eec226060ee62b24c56ae4e303d4ededba (diff)
fix host toolchain
Diffstat (limited to 'xmake/core/platform/platform.lua')
-rw-r--r--xmake/core/platform/platform.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/xmake/core/platform/platform.lua b/xmake/core/platform/platform.lua
index 1a8beb357..a58d225e5 100644
--- a/xmake/core/platform/platform.lua
+++ b/xmake/core/platform/platform.lua
@@ -204,7 +204,10 @@ function _instance:toolchains(opt)
if not toolchain_inst then
os.raise(errors)
end
- table.insert(toolchains, toolchain_inst)
+ -- ignore cross toolchains for the host platform:w
+ if (self:is_host() and not toolchain_inst:is_cross()) or not self:is_host() then
+ table.insert(toolchains, toolchain_inst)
+ end
end
end
self:_memcache():set("toolchains", toolchains)