diff options
| author | ruki <[email protected]> | 2022-05-19 22:18:08 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-05-19 22:18:08 +0800 |
| commit | 2a3f925f6dd3c3ffd0b4322b2423125dd207b045 (patch) | |
| tree | 367246f21b414357e045cf38bfd0e89edc472035 /xmake/modules/private/cache/build_cache.lua | |
| parent | 757251a0d8a993ceafe0a70eae723fdf44d27e9c (diff) | |
use md5
Diffstat (limited to 'xmake/modules/private/cache/build_cache.lua')
| -rw-r--r-- | xmake/modules/private/cache/build_cache.lua | 5 |
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 |
