summaryrefslogtreecommitdiff
path: root/xmake/modules/private/cache/build_cache.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2022-05-19 22:18:08 +0800
committerruki <[email protected]>2022-05-19 22:18:08 +0800
commit2a3f925f6dd3c3ffd0b4322b2423125dd207b045 (patch)
tree367246f21b414357e045cf38bfd0e89edc472035 /xmake/modules/private/cache/build_cache.lua
parent757251a0d8a993ceafe0a70eae723fdf44d27e9c (diff)
use md5
Diffstat (limited to 'xmake/modules/private/cache/build_cache.lua')
-rw-r--r--xmake/modules/private/cache/build_cache.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/xmake/modules/private/cache/build_cache.lua b/xmake/modules/private/cache/build_cache.lua
index f31270ecf..a8645f189 100644
--- a/xmake/modules/private/cache/build_cache.lua
+++ b/xmake/modules/private/cache/build_cache.lua
@@ -19,6 +19,7 @@
--
-- imports
+import("core.base.bytes")
import("core.base.hashset")
import("core.project.config")
@@ -49,7 +50,7 @@ function cachekey(program, cppfile, cppflags, envs)
table.insert(items, cppflag)
end
table.sort(items)
- table.insert(items, hash.sha1(cppfile)) -- TODO use blake3
+ table.insert(items, hash.md5(cppfile)) -- TODO use blake3
if envs then
local basename = path.basename(program)
if basename == "cl" then
@@ -61,7 +62,7 @@ function cachekey(program, cppfile, cppflags, envs)
end
end
end
- return (hash.uuid(table.concat(items, "")):gsub("-", ""))
+ return hash.md5(bytes(table.concat(items, "")))
end
-- get cache root directory