mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 21:04:52 +08:00
24 lines
508 B
PHP
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();
|
|
}
|
|
}
|