mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
make sure that mimalloc.o is *always* first, no matter if $_ENV['LIBS'] is set
This commit is contained in:
parent
51ec8199e4
commit
31e7cd31c1
@ -102,15 +102,17 @@ class SPCConfigUtil
|
|||||||
$libs = "-lphp {$libs} -lc";
|
$libs = "-lphp {$libs} -lc";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$allLibs = getenv('LIBS') . ' ' . $libs;
|
||||||
|
|
||||||
// mimalloc must come first
|
// mimalloc must come first
|
||||||
if (str_contains($libs, BUILD_LIB_PATH . '/mimalloc.o')) {
|
if (str_contains($libs, BUILD_LIB_PATH . '/mimalloc.o')) {
|
||||||
$libs = BUILD_LIB_PATH . '/mimalloc.o ' . str_replace(BUILD_LIB_PATH . '/mimalloc.o', '', $libs);
|
$allLibs = BUILD_LIB_PATH . '/mimalloc.o ' . str_replace(BUILD_LIB_PATH . '/mimalloc.o', '', $allLibs);
|
||||||
}
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'cflags' => trim(getenv('CFLAGS') . ' ' . $cflags),
|
'cflags' => trim(getenv('CFLAGS') . ' ' . $cflags),
|
||||||
'ldflags' => trim(getenv('LDFLAGS') . ' ' . $ldflags),
|
'ldflags' => trim(getenv('LDFLAGS') . ' ' . $ldflags),
|
||||||
'libs' => trim(getenv('LIBS') . ' ' . $libs),
|
'libs' => trim($allLibs),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user