diff options
| author | ruki <[email protected]> | 2020-12-14 22:43:43 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-12-14 22:43:43 +0800 |
| commit | a6f93e44186006e0ee73450937608ec24fef192e (patch) | |
| tree | 9bbadaeda9edc14f713c9bd284ddec922b791b05 /xmake | |
| parent | 4030bf655cd5bbf3af26b682078f4354eb2cb86c (diff) | |
add multivs tests
Diffstat (limited to 'xmake')
| -rw-r--r-- | xmake/core/project/target.lua | 2 | ||||
| -rw-r--r-- | xmake/core/sandbox/modules/import/lib/detect/cache.lua | 4 | ||||
| -rw-r--r-- | xmake/core/tool/toolchain.lua | 7 |
3 files changed, 3 insertions, 10 deletions
diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua index dab501131..bb6516767 100644 --- a/xmake/core/project/target.lua +++ b/xmake/core/project/target.lua @@ -1745,7 +1745,7 @@ function _instance:tool(toolkind) end -- get tool program - local key = toolkind .. "_" .. self:plat() .. "_" .. self:arch() + local key = self:name() .. "_" .. toolkind .. "_" .. self:plat() .. "_" .. self:arch() local program, toolname, toolchain_info local toolinfo = tools[key] if toolinfo == nil then diff --git a/xmake/core/sandbox/modules/import/lib/detect/cache.lua b/xmake/core/sandbox/modules/import/lib/detect/cache.lua index de2468bf9..f4eb7445d 100644 --- a/xmake/core/sandbox/modules/import/lib/detect/cache.lua +++ b/xmake/core/sandbox/modules/import/lib/detect/cache.lua @@ -34,8 +34,6 @@ local raise = require("sandbox/modules/raise") -- get detect cache instance function sandbox_lib_detect_cache._instance() - - -- get it local detectcache = sandbox_lib_detect_cache._INSTANCE or cache(os.isfile(project.rootfile()) and "local.detect" or "memory.detect") sandbox_lib_detect_cache._INSTANCE = detectcache return detectcache @@ -56,8 +54,6 @@ function sandbox_lib_detect_cache.load(name) cacheinfo = {} detectcache:set(name, cacheinfo) end - - -- ok? return cacheinfo end diff --git a/xmake/core/tool/toolchain.lua b/xmake/core/tool/toolchain.lua index 8775090a3..adb17c865 100644 --- a/xmake/core/tool/toolchain.lua +++ b/xmake/core/tool/toolchain.lua @@ -352,12 +352,9 @@ function _instance:_checktool(toolkind, toolpath) end end - -- init cache key - local cachekey = "toolchain_" .. self:plat() .. "_" .. self:arch() - -- find tool program local program, toolname - local tool = find_tool(toolpath, {cachekey = cachekey, program = toolpath, paths = self:bindir(), envs = self:get("runenvs")}) + local tool = find_tool(toolpath, {cachekey = self:cachekey(), program = toolpath, paths = self:bindir(), envs = self:get("runenvs")}) if tool then program = tool.program toolname = tool.name @@ -406,7 +403,7 @@ end function toolchain._cachekey(name, opt) local cachekey = opt.cachekey if not cachekey then - cachekey = name + cachekey = "toolchain_" .. name for _, k in ipairs(table.orderkeys(opt)) do local v = opt[k] cachekey = cachekey .. "_" .. k .. "_" .. tostring(v) |
