diff options
| author | ruki <[email protected]> | 2023-08-11 22:50:22 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-08-11 22:50:22 +0800 |
| commit | d77ae95506850e96a07b9a0b807d363df80856bb (patch) | |
| tree | 0138011aa22231907d603b7947afaaf814d1c653 | |
| parent | e9bb721deae72ae84f0f262b673496dbd60a08bd (diff) | |
improve toolchains
| -rw-r--r-- | tests/projects/package/toolchain_muslcc/xmake-requires.lock | 16 | ||||
| -rw-r--r-- | xmake/core/project/target.lua | 24 |
2 files changed, 20 insertions, 20 deletions
diff --git a/tests/projects/package/toolchain_muslcc/xmake-requires.lock b/tests/projects/package/toolchain_muslcc/xmake-requires.lock index 00f23d026..986902c39 100644 --- a/tests/projects/package/toolchain_muslcc/xmake-requires.lock +++ b/tests/projects/package/toolchain_muslcc/xmake-requires.lock @@ -17,15 +17,15 @@ commit = "8d4f0875fe9a3c63be4948cefca9f232954e3e87", url = "https://github.com/xmake-io/xmake-repo.git" }, - version = "1.16.4" + version = "1.16.5" }, ["cmake#31fecfc4"] = { repo = { branch = "master", - commit = "d3260ca0867f8b26aa2a72818bca3e6113a4fc42", - url = "https://github.com/xmake-io/xmake-repo.git" + commit = "bd51a8d551dad9aae6749511b2139658285d847f", + url = "https://gitee.com/tboox/xmake-repo.git" }, - version = "3.22.1" + version = "3.25.3" }, ["gmp#31fecfc4"] = { repo = { @@ -38,7 +38,7 @@ ["libisl 0.22#67114504"] = { repo = { branch = "master", - commit = "8d4f0875fe9a3c63be4948cefca9f232954e3e87", + commit = "123c0b54565571402683bb4efcf0d5cbaee53115", url = "https://github.com/xmake-io/xmake-repo.git" }, version = "0.22" @@ -62,7 +62,7 @@ ["libtool#31fecfc4"] = { repo = { branch = "master", - commit = "dd4abbd658b9897c9e1dcacf2e4bdeeb02d05860", + commit = "2918fbb829482398c8ab2676d05a46779d0f44b1", url = "https://github.com/xmake-io/xmake-repo.git" }, version = "2.4.6" @@ -73,7 +73,7 @@ commit = "8d4f0875fe9a3c63be4948cefca9f232954e3e87", url = "https://github.com/xmake-io/xmake-repo.git" }, - version = "1.4.19" + version = "1.4.6" }, ["muslcc#31fecfc4"] = { repo = { @@ -142,4 +142,4 @@ version = "v1.2.11" } } -} +}
\ No newline at end of file diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua index 4d4bf94dc..e9a603476 100644 --- a/xmake/core/project/target.lua +++ b/xmake/core/project/target.lua @@ -2077,10 +2077,10 @@ function _instance:toolchains() if toolchains == nil then -- load target toolchains first - toolchains = {} local has_standalone = false local target_toolchains = self:get("toolchains") if target_toolchains then + toolchains = {} for _, name in ipairs(table.wrap(target_toolchains)) do local toolchain_opt = table.copy(self:extraconf("toolchains", name)) toolchain_opt.arch = self:arch() @@ -2098,20 +2098,20 @@ function _instance:toolchains() end table.insert(toolchains, toolchain_inst) end - end - -- we need merge target and platform toolchains, - -- because we maybe only set partial toolchains in target, e.g. nasm toolchain - for _, toolchain_inst in ipairs(self:platform():toolchains()) do - if toolchain_inst:is_standalone() then - -- we can only add one standalone toolchain - if not has_standalone then - table.insert(toolchains, toolchain_inst) + -- we always need a standalone toolchain + -- because we maybe only set partial toolchains in target, e.g. nasm toolchain + if not has_standalone then + for _, toolchain_inst in ipairs(self:platform():toolchains()) do + if toolchain_inst:is_standalone() then + table.insert(toolchains, toolchain_inst) + has_standalone = true + break + end end - has_standalone = true - else - table.insert(toolchains, toolchain_inst) end + else + toolchains = self:platform():toolchains() end self:_memcache():set("toolchains", toolchains) |
