From a5355cb5224e37c9244b1e4ab18ad54a735d4649 Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 9 May 2024 23:35:59 +0800 Subject: [PATCH] fix package tool #5069 --- xmake/core/package/package.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua index e673f4345f1..48c84145bf9 100644 --- a/xmake/core/package/package.lua +++ b/xmake/core/package/package.lua @@ -1202,7 +1202,8 @@ end -- get the program and name of the given tool kind function _instance:tool(toolkind) if self:toolchains() then - return toolchain.tool(self:toolchains(), toolkind, {cachekey = "package", plat = self:plat(), arch = self:arch()}) + local cachekey = "package_" .. tostring(self) + return toolchain.tool(self:toolchains(), toolkind, {cachekey = cachekey, plat = self:plat(), arch = self:arch()}) else return platform.tool(toolkind, self:plat(), self:arch()) end @@ -1211,7 +1212,8 @@ end -- get tool configuration from the toolchains function _instance:toolconfig(name) if self:toolchains() then - return toolchain.toolconfig(self:toolchains(), name, {cachekey = "package", plat = self:plat(), arch = self:arch()}) + local cachekey = "package_" .. tostring(self) + return toolchain.toolconfig(self:toolchains(), name, {cachekey = cachekey, plat = self:plat(), arch = self:arch()}) else return platform.toolconfig(name, self:plat(), self:arch()) end