diff options
| -rw-r--r-- | tests/projects/package/toolchain_muslcc/xmake.lua | 6 | ||||
| -rw-r--r-- | xmake/actions/require/impl/package.lua | 7 |
2 files changed, 9 insertions, 4 deletions
diff --git a/tests/projects/package/toolchain_muslcc/xmake.lua b/tests/projects/package/toolchain_muslcc/xmake.lua index 930a116c7..48c048457 100644 --- a/tests/projects/package/toolchain_muslcc/xmake.lua +++ b/tests/projects/package/toolchain_muslcc/xmake.lua @@ -4,12 +4,12 @@ add_rules("mode.debug", "mode.release") set_plat("cross") set_arch("arm") --- add toolchains package -add_requires("muslcc") - -- add library packages add_requires("zlib", "libplist", {system = false}) +-- add toolchains package +add_requires("muslcc") + -- set global toolchains for target and packages set_toolchains("@muslcc") diff --git a/xmake/actions/require/impl/package.lua b/xmake/actions/require/impl/package.lua index 6a9ccfcce..c23a5efa8 100644 --- a/xmake/actions/require/impl/package.lua +++ b/xmake/actions/require/impl/package.lua @@ -634,7 +634,12 @@ function _load_packages(requires, opt) end -- save this package - table.insert(packages, 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 + table.insert(packages, 1, package) + else + table.insert(packages, package) + end end end return packages |
