Skip to content

Commit 2ea8a7e

Browse files
committed
Fix macOS embed re-archive bug
1 parent c0ea47c commit 2ea8a7e

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/SPC/builder/macos/MacOSBuilder.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -271,14 +271,7 @@ protected function buildEmbed(): void
271271

272272
shell()->cd(SOURCE_PATH . '/php-src')
273273
->exec(getenv('SPC_CMD_PREFIX_PHP_MAKE') . ' INSTALL_ROOT=' . BUILD_ROOT_PATH . " {$vars} install")
274-
// Workaround for https://github.com/php/php-src/issues/12082
275-
->exec('rm -Rf ' . BUILD_ROOT_PATH . '/lib/php-o')
276-
->exec('mkdir ' . BUILD_ROOT_PATH . '/lib/php-o')
277-
->cd(BUILD_ROOT_PATH . '/lib/php-o')
278-
->exec('ar x ' . BUILD_ROOT_PATH . '/lib/libphp.a')
279-
->exec('rm ' . BUILD_ROOT_PATH . '/lib/libphp.a')
280-
->exec('ar rcs ' . BUILD_ROOT_PATH . '/lib/libphp.a *.o')
281-
->exec('rm -Rf ' . BUILD_ROOT_PATH . '/lib/php-o');
274+
->exec('ar -t ' . BUILD_LIB_PATH . "/libphp.a | grep '\\.a$' | xargs -n1 ar d " . BUILD_LIB_PATH . '/libphp.a');
282275
$this->patchPhpScripts();
283276
}
284277

0 commit comments

Comments
 (0)