mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
docs for function
This commit is contained in:
parent
a9fab86269
commit
a0edca5e5b
@ -528,6 +528,14 @@ class Extension
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Splits a given string of library flags into static and shared libraries.
|
||||
*
|
||||
* @param string $allLibs A space-separated string of library flags (e.g., -lxyz).
|
||||
* @return array An array containing two elements: the first is a space-separated string
|
||||
* of static library flags, and the second is a space-separated string
|
||||
* of shared library flags.
|
||||
*/
|
||||
protected function splitLibsIntoStaticAndShared(string $allLibs): array
|
||||
{
|
||||
$staticLibString = '';
|
||||
@ -535,7 +543,7 @@ class Extension
|
||||
$libs = explode(' ', $allLibs);
|
||||
foreach ($libs as $lib) {
|
||||
$staticLib = BUILD_LIB_PATH . '/lib' . str_replace('-l', '', $lib) . '.a';
|
||||
if (!file_exists($staticLib) || $lib === '-lphp') {
|
||||
if ($lib === '-lphp' || !file_exists($staticLib)) {
|
||||
$sharedLibString .= " {$lib}";
|
||||
} else {
|
||||
$staticLibString .= " {$lib}";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user