summaryrefslogtreecommitdiff
path: root/xmake/rules/c++/modules/modules_support/common.lua
diff options
context:
space:
mode:
authorArthur LAURENT <[email protected]>2023-01-23 11:58:34 +0100
committerArthur LAURENT <[email protected]>2023-01-23 11:58:34 +0100
commit1294b1fa8b7022c711f148de258756794cf8ae66 (patch)
tree397ead237908d0f6cbe556d4767adf518cfb3c9b /xmake/rules/c++/modules/modules_support/common.lua
parente5709e2df72b30201941670a5b9d23f8ea1fc251 (diff)
use uuid instead of sha1 for module cache directories
Diffstat (limited to 'xmake/rules/c++/modules/modules_support/common.lua')
-rw-r--r--xmake/rules/c++/modules/modules_support/common.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/rules/c++/modules/modules_support/common.lua b/xmake/rules/c++/modules/modules_support/common.lua
index 98eae7be9..a01c78710 100644
--- a/xmake/rules/c++/modules/modules_support/common.lua
+++ b/xmake/rules/c++/modules/modules_support/common.lua
@@ -728,7 +728,8 @@ function get_outputdir(target, module)
end
return cached
else
- local hashed = hash.sha1(bytes(path.directory(modulepath) .. target:name())):sub(1, 6)
+ local key = path.directory(modulepath) .. target:name()
+ local hashed = hash.uuid(key):split("-", {plain = true})[1]:lower()
local moduledir = path.join(cachedir, hashed)
localcache():set2("modules_paths", modulepath, moduledir)
if not os.exists(moduledir) then