Skip to content

Commit

Permalink
Fix mimalloc debug build
Browse files Browse the repository at this point in the history
  • Loading branch information
WSSDude committed Feb 1, 2025
1 parent 754963f commit 8bde75e
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions packages/m/mimalloc/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ package("mimalloc")
add_configs("etw", {description = "Enable Event tracing for Windows", default = false, type = "boolean"})
end

set_policy("package.cmake_generator.ninja", true)

add_deps("cmake")

if is_plat("windows") then
Expand Down Expand Up @@ -79,11 +81,6 @@ package("mimalloc")
if package:gitref() or package:version():ge("2.1.2") then
table.insert(configs, "-DMI_INSTALL_TOPLEVEL=ON")
import("package.tools.cmake").install(package, configs, {cxflags = cxflags})

if package:is_plat("windows") and package:is_debug() then
local dir = package:installdir(package:config("shared") and "bin" or "lib")
os.cp(path.join(package:buildir(), "mimalloc-debug.pdb"), dir)
end
else
import("package.tools.cmake").build(package, configs, {buildir = "build", cxflags = cxflags})

Expand All @@ -96,7 +93,7 @@ package("mimalloc")
elseif package:is_plat("macosx") then
os.trycp("build/*.dylib", package:installdir("bin"))
os.trycp("build/*.dylib", package:installdir("lib"))
os.trycp("build/*.a", package:installdir("lib"))
os.trycp("build/*.a", package:installdir("lib"))
else
os.trycp("build/*.so", package:installdir("bin"))
os.trycp("build/*.so", package:installdir("lib"))
Expand Down

0 comments on commit 8bde75e

Please sign in to comment.