forward port #1138

This commit is contained in:
henderkes
2026-05-16 19:11:35 +07:00
parent 8d038f435d
commit fd882ce03e
2 changed files with 3 additions and 2 deletions

View File

@@ -463,9 +463,10 @@ abstract class UnixBuilderBase extends BuilderBase
"-tags={$muslTags}nobadger,nomysql,nopgx{$nobrotli}{$nowatcher}", "-tags={$muslTags}nobadger,nomysql,nopgx{$nobrotli}{$nowatcher}",
'LD_LIBRARY_PATH' => BUILD_LIB_PATH, 'LD_LIBRARY_PATH' => BUILD_LIB_PATH,
], ...GoXcaddy::getEnvironment()]; ], ...GoXcaddy::getEnvironment()];
$pgo = file_exists("{$frankenphpSourceDir}/caddy/frankenphp/default.pgo") ? "--pgo {$frankenphpSourceDir}/caddy/frankenphp/default.pgo " : '';
shell()->cd(BUILD_BIN_PATH) shell()->cd(BUILD_BIN_PATH)
->setEnv($env) ->setEnv($env)
->exec("xcaddy build --output frankenphp {$xcaddyModules}"); ->exec("xcaddy build --output frankenphp {$pgo}{$xcaddyModules}");
$this->deploySAPIBinary(BUILD_TARGET_FRANKENPHP); $this->deploySAPIBinary(BUILD_TARGET_FRANKENPHP);
} }

View File

@@ -85,7 +85,7 @@ class GoXcaddy extends CustomPackage
'GOBIN' => "{$pkgroot}/go-xcaddy/bin", 'GOBIN' => "{$pkgroot}/go-xcaddy/bin",
'GOPATH' => "{$pkgroot}/go", 'GOPATH' => "{$pkgroot}/go",
]) ])
->exec('CC=cc go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest'); ->exec('CGO_ENABLED=0 go install github.com/caddyserver/xcaddy/cmd/xcaddy@master');
} }
public static function getEnvironment(): array public static function getEnvironment(): array