summaryrefslogtreecommitdiff
path: root/xmake/modules/detect/tools/ml/has_flags.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2020-12-23 00:00:24 +0800
committerruki <[email protected]>2020-12-23 00:00:24 +0800
commit5eb09e88851744fb544c5b6ed5e20a448928daa0 (patch)
treef65e2570f193ec11693b174bc0b2b4ff1d37a421 /xmake/modules/detect/tools/ml/has_flags.lua
parentfd125f21ece875cd6a5037725f2d84f24e658f41 (diff)
remove lib.detect.cache
Diffstat (limited to 'xmake/modules/detect/tools/ml/has_flags.lua')
-rw-r--r--xmake/modules/detect/tools/ml/has_flags.lua13
1 files changed, 4 insertions, 9 deletions
diff --git a/xmake/modules/detect/tools/ml/has_flags.lua b/xmake/modules/detect/tools/ml/has_flags.lua
index 439c0fa5a..53576fa22 100644
--- a/xmake/modules/detect/tools/ml/has_flags.lua
+++ b/xmake/modules/detect/tools/ml/has_flags.lua
@@ -19,7 +19,7 @@
--
-- imports
-import("lib.detect.cache")
+import("core.cache.detectcache")
-- attempt to check it from the argument list
function _check_from_arglist(flags, opt)
@@ -35,11 +35,8 @@ function _check_from_arglist(flags, opt)
-- 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
@@ -52,11 +49,9 @@ function _check_from_arglist(flags, opt)
end
-- save cache
- cacheinfo[flagskey] = allflags
- cache.save(key, cacheinfo)
+ detectcache:set2(key, flagskey, allflags)
+ detectcache:save()
end
-
- -- ok?
return allflags[flags[1]:gsub("/", "-")]
end