Skip to content

Commit ecaa31f

Browse files
committed
no start group for macos
1 parent fda637b commit ecaa31f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/SPC/builder/Extension.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,11 +414,13 @@ public function buildUnixShared(): void
414414
$this->builder->getOption('with-suggested-libs'),
415415
);
416416
[$staticLibs, $sharedLibs] = $this->splitLibsIntoStaticAndShared($config['libs']);
417+
$preStatic = PHP_OS_FAMILY === 'Darwin' ? '' : '-Wl,--start-group ';
418+
$postStatic = PHP_OS_FAMILY === 'Darwin' ? '' : ' -Wl,--end-group ';
417419
$env = [
418420
'CFLAGS' => $config['cflags'],
419421
'CXXFLAGS' => $config['cflags'],
420422
'LDFLAGS' => $config['ldflags'],
421-
'LIBS' => "-Wl,--start-group {$staticLibs} -Wl,--end-group {$sharedLibs}",
423+
'LIBS' => clean_spaces("{$preStatic} {$staticLibs} {$postStatic} {$sharedLibs}"),
422424
'LD_LIBRARY_PATH' => BUILD_LIB_PATH,
423425
];
424426
if (ToolchainManager::getToolchainClass() === ZigToolchain::class && SPCTarget::getTargetOS() === 'Linux') {

0 commit comments

Comments
 (0)