Skip to content

Commit 808d224

Browse files
committed
build frankenphp before shared extensions again
1 parent 4247883 commit 808d224

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

src/SPC/builder/linux/LinuxBuilder.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,16 +147,15 @@ public function buildPHP(int $build_target = BUILD_TARGET_NONE): void
147147
}
148148
$this->buildEmbed();
149149
}
150-
// build dynamic extensions if needed, must happen before building FrankenPHP to make sure we export all necessary, undefined symbols
150+
if ($enableFrankenphp) {
151+
logger()->info('building frankenphp');
152+
$this->buildFrankenphp();
153+
}
151154
$shared_extensions = array_map('trim', array_filter(explode(',', $this->getOption('build-shared'))));
152155
if (!empty($shared_extensions)) {
153156
logger()->info('Building shared extensions ...');
154157
$this->buildSharedExts();
155158
}
156-
if ($enableFrankenphp) {
157-
logger()->info('building frankenphp');
158-
$this->buildFrankenphp();
159-
}
160159
}
161160

162161
public function testPHP(int $build_target = BUILD_TARGET_NONE)
@@ -326,7 +325,7 @@ protected function buildEmbed(): void
326325
$target = "{$libDir}/{$realLibName}";
327326
if (file_exists($target)) {
328327
[, $output] = shell()->execWithResult('readelf -d ' . escapeshellarg($target));
329-
$output = join("\n", $output);
328+
$output = implode("\n", $output);
330329
if (preg_match('/SONAME.*\[(.+)]/', $output, $sonameMatch)) {
331330
$currentSoname = $sonameMatch[1];
332331
if ($currentSoname !== basename($target)) {

src/SPC/builder/macos/MacOSBuilder.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,15 +161,15 @@ public function buildPHP(int $build_target = BUILD_TARGET_NONE): void
161161
}
162162
$this->buildEmbed();
163163
}
164+
if ($enableFrankenphp) {
165+
logger()->info('building frankenphp');
166+
$this->buildFrankenphp();
167+
}
164168
$shared_extensions = array_map('trim', array_filter(explode(',', $this->getOption('build-shared'))));
165169
if (!empty($shared_extensions)) {
166170
logger()->info('Building shared extensions ...');
167171
$this->buildSharedExts();
168172
}
169-
if ($enableFrankenphp) {
170-
logger()->info('building frankenphp');
171-
$this->buildFrankenphp();
172-
}
173173
}
174174

175175
public function testPHP(int $build_target = BUILD_TARGET_NONE)

0 commit comments

Comments
 (0)