aboutsummaryrefslogtreecommitdiff
path: root/repo/packages/m/mimalloc/xmake.lua
diff options
context:
space:
mode:
Diffstat (limited to 'repo/packages/m/mimalloc/xmake.lua')
-rw-r--r--repo/packages/m/mimalloc/xmake.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/repo/packages/m/mimalloc/xmake.lua b/repo/packages/m/mimalloc/xmake.lua
index 993e4c1a9..54d6613b8 100644
--- a/repo/packages/m/mimalloc/xmake.lua
+++ b/repo/packages/m/mimalloc/xmake.lua
@@ -35,7 +35,7 @@ package("mimalloc")
end
on_install("macosx", "windows", "linux", "android", "mingw", function (package)
- local configs = {"-DMI_OVERRIDE=OFF"}
+ local configs = {"-DMI_OVERRIDE=OFF", "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release")}
table.insert(configs, "-DMI_BUILD_STATIC=" .. (package:config("shared") and "OFF" or "ON"))
table.insert(configs, "-DMI_BUILD_SHARED=" .. (package:config("shared") and "ON" or "OFF"))
table.insert(configs, "-DMI_SECURE=" .. (package:config("secure") and "ON" or "OFF"))
@@ -71,5 +71,7 @@ package("mimalloc")
end)
on_test(function (package)
- assert(package:has_cfuncs("mi_malloc", {includes = "mimalloc.h"}))
+ if not package:is_cross() then
+ assert(package:has_cfuncs("mi_malloc", {includes = "mimalloc.h"}))
+ end
end)