mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-19 21:34:53 +08:00
only needed on linux
This commit is contained in:
parent
e71f76288b
commit
f37c863092
@ -296,11 +296,12 @@ abstract class UnixBuilderBase extends BuilderBase
|
||||
if ($this->getLib('brotli') !== null && !str_contains($xcaddyModules, '--with github.com/dunglas/caddy-cbrotli')) {
|
||||
$xcaddyModules .= ' --with github.com/dunglas/caddy-cbrotli';
|
||||
}
|
||||
$lrt = PHP_OS_FAMILY === 'Linux' ? '-lrt' : '';
|
||||
|
||||
$env = [
|
||||
'CGO_ENABLED' => '1',
|
||||
'CGO_CFLAGS' => '$(php-config --includes) -I$(php-config --include-dir)/..',
|
||||
'CGO_LDFLAGS' => '$(php-config --ldflags) -L' . BUILD_LIB_PATH . " $(php-config --libs) {$brotliLibs} {$watcherLibs} -lphp -lrt",
|
||||
'CGO_LDFLAGS' => '$(php-config --ldflags) -L' . BUILD_LIB_PATH . " $(php-config --libs) {$brotliLibs} {$watcherLibs} -lphp {$lrt}",
|
||||
'XCADDY_GO_BUILD_FLAGS' => "-ldflags='-w -s' -tags=nobadger,nomysql,nopgx{$nobrotli}{$nowatcher}",
|
||||
'LD_LIBRARY_PATH' => BUILD_LIB_PATH,
|
||||
];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user