mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-17 20:34:51 +08:00
get rid of $rt
This commit is contained in:
parent
65ee7479ac
commit
f80aee5133
@ -261,7 +261,6 @@ abstract class UnixBuilderBase extends BuilderBase
|
||||
logger()->warning('caddy-cbrotli module is enabled, but brotli library is not built. Disabling caddy-cbrotli.');
|
||||
$xcaddyModules = str_replace('--with github.com/dunglas/caddy-cbrotli', '', $xcaddyModules);
|
||||
}
|
||||
$lrt = PHP_OS_FAMILY === 'Linux' ? '-lrt' : '';
|
||||
$releaseInfo = json_decode(Downloader::curlExec(
|
||||
'https://api.github.com/repos/php/frankenphp/releases/latest',
|
||||
hooks: [[CurlHook::class, 'setupGithubToken']],
|
||||
@ -284,7 +283,7 @@ abstract class UnixBuilderBase extends BuilderBase
|
||||
$config = (new SPCConfigUtil($this))->config($this->ext_list, $this->lib_list);
|
||||
$cflags = "{$this->arch_c_flags} {$config['cflags']} " . getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS');
|
||||
$libs = $config['libs'];
|
||||
|
||||
$libs .= PHP_OS_FAMILY === 'Linux' ? ' -lrt' : '';
|
||||
if ((str_contains((string) getenv('SPC_DEFAULT_C_FLAGS'), '-fprofile') ||
|
||||
str_contains((string) getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS'), '-fprofile')) &&
|
||||
ToolchainManager::getToolchainClass() === GccNativeToolchain::class) {
|
||||
@ -294,7 +293,7 @@ abstract class UnixBuilderBase extends BuilderBase
|
||||
$env = [
|
||||
'CGO_ENABLED' => '1',
|
||||
'CGO_CFLAGS' => clean_spaces($cflags),
|
||||
'CGO_LDFLAGS' => "{$this->arch_ld_flags} {$staticFlags} {$config['ldflags']} {$libs} {$lrt}",
|
||||
'CGO_LDFLAGS' => "{$this->arch_ld_flags} {$staticFlags} {$config['ldflags']} {$libs}",
|
||||
'XCADDY_GO_BUILD_FLAGS' => '-buildmode=pie ' .
|
||||
'-ldflags \"-linkmode=external ' . $extLdFlags . ' ' . $debugFlags .
|
||||
'-X \'github.com/caddyserver/caddy/v2.CustomVersion=FrankenPHP ' .
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user