summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2025-10-09 14:05:54 +0800
committerGitHub <[email protected]>2025-10-09 14:05:54 +0800
commit3a2c66848cab8f59b9c96b777ceadde7064cd38d (patch)
treeb8bc7dd7df004fd58b9a464611e19c8016524c6e
parentefe96186ac2678b006a00b86e75b2c6346398ab4 (diff)
parentaf2c3462e2897f203d2f846fc1802b192e4e12ad (diff)
Merge pull request #6908 from xmake-io/hash
reuse rand32
-rw-r--r--tests/projects/c++/modules/test_base.lua2
-rw-r--r--xmake/core/package/package.lua4
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/projects/c++/modules/test_base.lua b/tests/projects/c++/modules/test_base.lua
index 0a0d07dae..6abbeecee 100644
--- a/tests/projects/c++/modules/test_base.lua
+++ b/tests/projects/c++/modules/test_base.lua
@@ -103,7 +103,7 @@ function build_tests(toolchain_name, opt)
end
os.exec("xmake clean -a")
- os.exec("xmake f" .. platform .. "--toolchain=" .. toolchain_name .. runtimes .. "-c --yes " .. policies .. flags)
+ os.exec("xmake f" .. platform .. "--toolchain=" .. toolchain_name .. runtimes .. "-cD --yes " .. policies .. flags)
if opt.build then
opt.build()
else
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua
index 3f9917850..4e89c0cd7 100644
--- a/xmake/core/package/package.lua
+++ b/xmake/core/package/package.lua
@@ -830,9 +830,9 @@ function _instance:builddir()
if self:is_local() then
local name = self:name():lower():gsub("::", "_")
local rootdir = path.join(config.builddir({absolute = true}), ".packages", name:sub(1, 1):lower(), name, self:version_str())
- builddir = path.join(rootdir, "cache", "build_" .. hash.rand64())
+ builddir = path.join(rootdir, "cache", "build_" .. hash.rand32())
else
- builddir = "build_" .. hash.rand64()
+ builddir = "build_" .. hash.rand32()
end
self._BUILDDIR = builddir
end