From 7ee049f4dd018b0a0fc5288d7c95f95679cabea8 Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 15 Feb 2021 22:32:22 +0800 Subject: fix load toolchain packages --- xmake/modules/private/action/require/impl/package.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xmake/modules/private/action/require/impl/package.lua b/xmake/modules/private/action/require/impl/package.lua index 00bd203e5..f556374fc 100644 --- a/xmake/modules/private/action/require/impl/package.lua +++ b/xmake/modules/private/action/require/impl/package.lua @@ -618,8 +618,11 @@ function _load_packages(requires, opt) -- save this package -- @note if this root package is toolchain, we need to move it to the beginning in order to install first - if not opt.parentinfo and package:is_toolchain() then + if not package:parents() and package:is_toolchain() then table.insert(packages, 1, package) + for _, dep in irpairs(package:orderdeps()) do + table.insert(packages, 1, dep) + end else table.insert(packages, package) end -- cgit v1.3.1