Skip to content

Commit 190be6c

Browse files
committed
macos?
1 parent 2972ab3 commit 190be6c

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
@@ -203,7 +203,7 @@ protected function sanityCheck(int $build_target): void
203203
unlink($file);
204204
}
205205
$symbolList = $this->getDynamicExportSymbolsFile();
206-
$dynamic_exports = $symbolList ? (' -Wl,--dynamic-list=' . $symbolList) : '';
206+
$dynamic_exports = $symbolList ? (' -Wl,--dynamic-list' . (SPCTarget::getTargetOS() === 'Darwin' ? '-file' : '') . '=' . $symbolList) : '';
207207
}
208208
[$ret, $out] = shell()->cd($sample_file_path)->execWithResult(getenv('CC') . ' -o embed embed.c ' . $lens . ' ' . $dynamic_exports);
209209
if ($ret !== 0) {
@@ -327,7 +327,7 @@ protected function buildFrankenphp(): void
327327
$dynamic_exports = '';
328328
if (getenv('SPC_CMD_VAR_PHP_EMBED_TYPE') === 'static') {
329329
$symbolList = $this->getDynamicExportSymbolsFile();
330-
$dynamic_exports = $symbolList ? (' -Wl,--dynamic-list=' . $symbolList) : '';
330+
$dynamic_exports = $symbolList ? (' -Wl,--dynamic-list' . (SPCTarget::getTargetOS() === 'Darwin' ? '-file' : '') . '=' . $symbolList) : '';
331331
}
332332
$extLdFlags = "-extldflags '-pie{$dynamic_exports}'";
333333
$muslTags = '';

0 commit comments

Comments
 (0)