summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2025-12-18 22:36:39 +0800
committerruki <[email protected]>2025-12-18 22:36:39 +0800
commitc0121ce62aac7b8f37d7f2d99d7d7ad52c1fb674 (patch)
tree11647e340c4c1e65babe2ce3250b6e163a1fc0ee
parentc765a2c1cac6ab126efc779eb4c823c5573dd25d (diff)
fix conflict
-rw-r--r--xmake/core/sandbox/modules/import/core/tool/toolchain.lua1
-rw-r--r--xmake/core/tool/toolchain.lua8
2 files changed, 5 insertions, 4 deletions
diff --git a/xmake/core/sandbox/modules/import/core/tool/toolchain.lua b/xmake/core/sandbox/modules/import/core/tool/toolchain.lua
index 922074cac..4282acd0f 100644
--- a/xmake/core/sandbox/modules/import/core/tool/toolchain.lua
+++ b/xmake/core/sandbox/modules/import/core/tool/toolchain.lua
@@ -31,6 +31,7 @@ local raise = require("sandbox/modules/raise")
sandbox_core_tool_toolchain.apis = toolchain.apis
sandbox_core_tool_toolchain.directories = toolchain.directories
sandbox_core_tool_toolchain.save = toolchain.save
+sandbox_core_tool_toolchain.memcache = toolchain.memcache
-- get all toolchains list
function sandbox_core_tool_toolchain.list()
diff --git a/xmake/core/tool/toolchain.lua b/xmake/core/tool/toolchain.lua
index 1da1634db..4fff15683 100644
--- a/xmake/core/tool/toolchain.lua
+++ b/xmake/core/tool/toolchain.lua
@@ -567,7 +567,7 @@ function _instance:_checktool(toolkind, toolpath)
end
-- get memcache
-function toolchain._memcache()
+function toolchain.memcache()
return memcache.cache("core.tool.toolchain")
end
@@ -732,7 +732,7 @@ function toolchain.load(name, opt)
configs.arch = opt.arch or config.get("arch") or os.arch()
-- get cache
- local cache = toolchain._memcache()
+ local cache = toolchain.memcache()
local cachekey = toolchain._cachekey(name, configs)
-- get it directly from cache dirst
@@ -797,7 +797,7 @@ function toolchain.load_withinfo(name, info, opt)
configs.arch = opt.arch or config.get("arch") or os.arch()
-- get cache key
- local cache = toolchain._memcache()
+ local cache = toolchain.memcache()
local cachekey = toolchain._cachekey(name, configs)
-- get it directly from cache dirst
@@ -909,7 +909,7 @@ function toolchain.toolconfig(toolchains, name, opt)
local arch = opt.arch or config.get("arch") or os.arch()
-- get cache and cachekey
- local cache = toolchain._memcache()
+ local cache = toolchain.memcache()
local cachekey = "toolconfig_" .. (opt.cachekey or "") .. "_" .. plat .. "_" .. arch
-- get configuration