Skip to content

Commit fd882ce

Browse files
committed
forward port #1138
1 parent 8d038f4 commit fd882ce

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/SPC/builder/unix/UnixBuilderBase.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,9 +463,10 @@ protected function buildFrankenphp(): void
463463
"-tags={$muslTags}nobadger,nomysql,nopgx{$nobrotli}{$nowatcher}",
464464
'LD_LIBRARY_PATH' => BUILD_LIB_PATH,
465465
], ...GoXcaddy::getEnvironment()];
466+
$pgo = file_exists("{$frankenphpSourceDir}/caddy/frankenphp/default.pgo") ? "--pgo {$frankenphpSourceDir}/caddy/frankenphp/default.pgo " : '';
466467
shell()->cd(BUILD_BIN_PATH)
467468
->setEnv($env)
468-
->exec("xcaddy build --output frankenphp {$xcaddyModules}");
469+
->exec("xcaddy build --output frankenphp {$pgo}{$xcaddyModules}");
469470

470471
$this->deploySAPIBinary(BUILD_TARGET_FRANKENPHP);
471472
}

src/SPC/store/pkg/GoXcaddy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function extract(string $name): void
8585
'GOBIN' => "{$pkgroot}/go-xcaddy/bin",
8686
'GOPATH' => "{$pkgroot}/go",
8787
])
88-
->exec('CC=cc go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest');
88+
->exec('CGO_ENABLED=0 go install github.com/caddyserver/xcaddy/cmd/xcaddy@master');
8989
}
9090

9191
public static function getEnvironment(): array

0 commit comments

Comments
 (0)