2025-06-09 01:07:30 +08:00

24 lines
508 B
PHP

<?php
declare(strict_types=1);
namespace SPC\builder\unix\library;
use SPC\builder\unix\executor\UnixCMakeExecutor;
trait mimalloc
{
protected function build(): void
{
$cmake = UnixCMakeExecutor::create($this)
->addConfigureArgs(
'-DMI_BUILD_SHARED=OFF',
'-DMI_INSTALL_TOPLEVEL=ON'
);
if (getenv('SPC_LIBC') === 'musl') {
$cmake->addConfigureArgs('-DMI_LIBC_MUSL=ON');
}
$cmake->build();
}
}