summaryrefslogtreecommitdiff
path: root/xmake/modules/detect/tools/sdcc
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/sdcc
parentfd125f21ece875cd6a5037725f2d84f24e658f41 (diff)
remove lib.detect.cache
Diffstat (limited to 'xmake/modules/detect/tools/sdcc')
-rw-r--r--xmake/modules/detect/tools/sdcc/has_flags.lua13
1 files changed, 4 insertions, 9 deletions
diff --git a/xmake/modules/detect/tools/sdcc/has_flags.lua b/xmake/modules/detect/tools/sdcc/has_flags.lua
index c2b144334..1198b6f44 100644
--- a/xmake/modules/detect/tools/sdcc/has_flags.lua
+++ b/xmake/modules/detect/tools/sdcc/has_flags.lua
@@ -19,7 +19,7 @@
--
-- imports
-import("lib.detect.cache")
+import("core.cache.detectcache")
import("core.language.language")
-- is linker?
@@ -58,11 +58,8 @@ function _check_from_arglist(flags, opt, islinker)
-- make flags key
local flagskey = opt.program .. "_" .. (opt.programver or "")
- -- load cache
- local cacheinfo = cache.load(key)
-
-- get all flags from argument list
- local allflags = cacheinfo[flagskey]
+ local allflags = detectcache:get2(key, flagskey)
if not allflags then
-- get argument list
@@ -75,11 +72,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