summaryrefslogtreecommitdiff
path: root/xmake/modules/package
diff options
context:
space:
mode:
authorruki <[email protected]>2024-08-24 07:22:42 +0800
committerGitHub <[email protected]>2024-08-24 07:22:42 +0800
commitc80898e12f88abe7df463bc64e0fb6bf081b8cdf (patch)
tree778fc24c5ff2207419f0f06c60fff46b67739d03 /xmake/modules/package
parent3ba77c15ccf34187b6678f277f2dd418433493c8 (diff)
parentd19c47eac0a44b0bfbbf2e4ce7cf98713720a245 (diff)
Merge pull request #5466 from xmake-io/toolchain
Improve to check and load toolchain
Diffstat (limited to 'xmake/modules/package')
-rw-r--r--xmake/modules/package/manager/system/find_package.lua30
1 files changed, 0 insertions, 30 deletions
diff --git a/xmake/modules/package/manager/system/find_package.lua b/xmake/modules/package/manager/system/find_package.lua
index 4d939e495..632db0c63 100644
--- a/xmake/modules/package/manager/system/find_package.lua
+++ b/xmake/modules/package/manager/system/find_package.lua
@@ -38,26 +38,6 @@ function _get_package_items()
return items
end
--- check package toolchains
-function _check_package_toolchains(package)
- local has_standalone
- if package:toolchains() then
- for _, toolchain_inst in ipairs(package:toolchains()) do
- if toolchain_inst:check() and toolchain_inst:is_standalone() then
- has_standalone = true
- end
- end
- else
- -- we need also check platform toolchain, perhaps it has a different platform arch.
- -- @see https://github.com/xmake-io/xmake/issues/4043#issuecomment-2102486249
- local platform_inst = platform.load(package:plat(), package:arch())
- if platform_inst:check() then
- has_standalone = true
- end
- end
- return has_standalone
-end
-
-- find package from system and compiler
-- @see https://github.com/xmake-io/xmake/issues/4596
--
@@ -80,16 +60,6 @@ function main(name, opt)
end
snippet_configs.links = snippet_configs.links or name
- -- We need to check package toolchain first
- -- https://github.com/xmake-io/xmake/issues/4596#issuecomment-2014528801
- --
- -- But if it depends on some toolchain packages,
- -- then they can't be detected early in the fetch and we have to disable system.find_package
- local package = opt.package
- if package and not _check_package_toolchains(package) then
- return
- end
-
local snippet_opt = {
verbose = opt.verbose,
target = opt.package,