File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff 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 ' ) {
You can’t perform that action at this time.
0 commit comments