summaryrefslogtreecommitdiff
path: root/xmake/modules
diff options
context:
space:
mode:
authorruki <[email protected]>2021-02-15 22:32:22 +0800
committerruki <[email protected]>2021-02-15 22:32:22 +0800
commit7ee049f4dd018b0a0fc5288d7c95f95679cabea8 (patch)
tree3318be094542fae626f542e24f2c46aaf9c94cf9 /xmake/modules
parentb1661f3e0f9c0211c14c0d088dc2698cf09d3e8b (diff)
fix load toolchain packages
Diffstat (limited to 'xmake/modules')
-rw-r--r--xmake/modules/private/action/require/impl/package.lua5
1 files changed, 4 insertions, 1 deletions
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