mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-19 13:24:51 +08:00
enable compile optimization for other libraries
This commit is contained in:
parent
980da4ea0f
commit
6131e1881b
@ -54,7 +54,7 @@ class MacOSBuilder extends BuilderBase
|
||||
'PKG_CONFIG_PATH="' . BUILD_LIB_PATH . '/pkgconfig/" ' .
|
||||
"CC='{$this->cc}' " .
|
||||
"CXX='{$this->cxx}' " .
|
||||
"CFLAGS='{$this->arch_c_flags} -Wimplicit-function-declaration'";
|
||||
"CFLAGS='{$this->arch_c_flags} -Wimplicit-function-declaration -Os'";
|
||||
|
||||
// 创立 pkg-config 和放头文件的目录
|
||||
f_mkdir(BUILD_LIB_PATH . '/pkgconfig', recursive: true);
|
||||
@ -212,7 +212,7 @@ class MacOSBuilder extends BuilderBase
|
||||
public function buildCli(string $extra_libs): void
|
||||
{
|
||||
$shell = shell()->cd(SOURCE_PATH . '/php-src');
|
||||
$shell->exec("make -j{$this->concurrency} EXTRA_CFLAGS=\"-g -Os -fno-ident\" EXTRA_LIBS=\"{$extra_libs} -lresolv\" cli");
|
||||
$shell->exec("make -j{$this->concurrency} EXTRA_CFLAGS=\"-g -Os\" EXTRA_LIBS=\"{$extra_libs} -lresolv\" cli");
|
||||
if ($this->strip) {
|
||||
$shell->exec('dsymutil -f sapi/cli/php')->exec('strip sapi/cli/php');
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user