Skip to content

Commit 2ed8bbf

Browse files
committed
add cflags and ldflags to frankenphp build
1 parent ef30257 commit 2ed8bbf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/SPC/builder/unix/UnixBuilderBase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,8 @@ protected function buildFrankenphp(): void
282282
$config = (new SPCConfigUtil($this))->config($this->ext_list, $this->lib_list);
283283
$env = [
284284
'CGO_ENABLED' => '1',
285-
'CGO_CFLAGS' => $config['cflags'],
286-
'CGO_LDFLAGS' => "{$staticFlags} {$config['ldflags']} {$config['libs']} {$lrt}",
285+
'CGO_CFLAGS' => $this->arch_c_flags . ' ' . $config['cflags'],
286+
'CGO_LDFLAGS' => $this->arch_ld_flags . " {$staticFlags} {$config['ldflags']} {$config['libs']} {$lrt} -lgcov",
287287
'XCADDY_GO_BUILD_FLAGS' => '-buildmode=pie ' .
288288
'-ldflags \"-linkmode=external ' . $extLdFlags . ' ' . $debugFlags .
289289
'-X \'github.com/caddyserver/caddy/v2.CustomVersion=FrankenPHP ' .

0 commit comments

Comments
 (0)