mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-04 23:35:40 +08:00
juggle mimalloc.o to the beginning
This commit is contained in:
@@ -42,6 +42,10 @@ class SPCConfigUtil
|
||||
if ($this->builder->hasCpp()) {
|
||||
$libs .= $this->builder instanceof MacOSBuilder ? ' -lc++' : ' -lstdc++';
|
||||
}
|
||||
// mimalloc must come first
|
||||
if (str_contains($libs, BUILD_LIB_PATH . '/mimalloc.o')) {
|
||||
$libs = BUILD_LIB_PATH . '/mimalloc.o ' . str_replace(BUILD_LIB_PATH . '/mimalloc.o', '', $libs);
|
||||
}
|
||||
return [
|
||||
'cflags' => $cflags,
|
||||
'ldflags' => $ldflags,
|
||||
|
||||
Reference in New Issue
Block a user