From 5eb09e88851744fb544c5b6ed5e20a448928daa0 Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 23 Dec 2020 00:00:24 +0800 Subject: remove lib.detect.cache --- xmake/modules/detect/tools/zig/has_flags.lua | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'xmake/modules/detect/tools/zig/has_flags.lua') diff --git a/xmake/modules/detect/tools/zig/has_flags.lua b/xmake/modules/detect/tools/zig/has_flags.lua index 12091eb87..b12f3defb 100644 --- a/xmake/modules/detect/tools/zig/has_flags.lua +++ b/xmake/modules/detect/tools/zig/has_flags.lua @@ -19,7 +19,7 @@ -- -- imports -import("lib.detect.cache") +import("core.cache.detectcache") -- is linker? function _islinker(flags, opt) @@ -51,11 +51,8 @@ function _check_from_arglist(flags, opt, islinker) -- make allflags key local flagskey = opt.program .. "_" .. (opt.programver or "") - -- load cache - local cacheinfo = cache.load(key) - -- get all allflags from argument list - local allflags = cacheinfo[flagskey] + local allflags = detectcache:get2(key, flagskey) if not allflags then -- get argument list @@ -68,11 +65,9 @@ function _check_from_arglist(flags, opt, islinker) end -- save cache - cacheinfo[flagskey] = allflags - cache.save(key, cacheinfo) + detectcache:set2(key, flagskey, allflags) + detectcache:save() end - - -- ok? return allflags[flags[1]] end -- cgit v1.3.1