mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-19 13:24:51 +08:00
don't bake the rpath in, otherwise we might run into issues when loading frankenphp after compiling a different version
This commit is contained in:
parent
c1e68323c7
commit
92338d478e
@ -289,14 +289,16 @@ abstract class UnixBuilderBase extends BuilderBase
|
|||||||
f_putenv("PATH={$path}");
|
f_putenv("PATH={$path}");
|
||||||
|
|
||||||
$brotliLibs = $this->getLib('brotli') !== null ? '-lbrotlienc -lbrotlidec -lbrotlicommon' : '';
|
$brotliLibs = $this->getLib('brotli') !== null ? '-lbrotlienc -lbrotlidec -lbrotlicommon' : '';
|
||||||
|
$watcherLibs = $this->getLib('brotli') !== null ? '-lwatcher-c' : '';
|
||||||
$nobrotli = $this->getLib('brotli') === null ? ',nobrotli' : '';
|
$nobrotli = $this->getLib('brotli') === null ? ',nobrotli' : '';
|
||||||
$nowatcher = $this->getLib('watcher') === null ? ',nowatcher' : '';
|
$nowatcher = $this->getLib('watcher') === null ? ',nowatcher' : '';
|
||||||
|
|
||||||
$env = [
|
$env = [
|
||||||
'CGO_ENABLED' => '1',
|
'CGO_ENABLED' => '1',
|
||||||
'CGO_CFLAGS' => '$(php-config --includes) -I$(php-config --include-dir)/..',
|
'CGO_CFLAGS' => '$(php-config --includes) -I$(php-config --include-dir)/..',
|
||||||
'CGO_LDFLAGS' => "$(php-config --ldflags) $(php-config --libs) {$brotliLibs} -lwatcher-c -lphp -Wl,-rpath=" . BUILD_LIB_PATH,
|
'CGO_LDFLAGS' => "$(php-config --ldflags) $(php-config --libs) {$brotliLibs} {$watcherLibs} -lphp",
|
||||||
'XCADDY_GO_BUILD_FLAGS' => "-ldflags='-w -s' -tags=nobadger,nomysql,nopgx" . $nobrotli . $nowatcher,
|
'XCADDY_GO_BUILD_FLAGS' => "-ldflags='-w -s' -tags=nobadger,nomysql,nopgx" . $nobrotli . $nowatcher,
|
||||||
|
'LD_LIBRARY_PATH' => BUILD_LIB_PATH,
|
||||||
];
|
];
|
||||||
shell()->cd(BUILD_BIN_PATH)
|
shell()->cd(BUILD_BIN_PATH)
|
||||||
->setEnv($env)
|
->setEnv($env)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user