File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -455,12 +455,17 @@ public function buildUnixShared(): void
455455
456456 // process *.so file
457457 $ soFile = BUILD_MODULES_PATH . '/ ' . $ this ->getName () . '.so ' ;
458+ $ soDest = $ soFile ;
459+ preg_match ('/-release\s+(\S*)/ ' , getenv ('SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS ' ), $ matches );
460+ if (!empty ($ matches [1 ])) {
461+ $ soDest = str_replace ('.so ' , '- ' . $ matches [1 ] . '.so ' , $ soFile );
462+ }
458463 if (!file_exists ($ soFile )) {
459464 throw new ValidationException ("extension {$ this ->getName ()} build failed: {$ soFile } not found " , validation_module: "Extension {$ this ->getName ()} build " );
460465 }
461466 /** @var UnixBuilderBase $builder */
462467 $ builder = $ this ->builder ;
463- $ builder ->deployBinary ($ soFile , $ soFile , false );
468+ $ builder ->deployBinary ($ soFile , $ soDest , false );
464469 }
465470
466471 /**
You can’t perform that action at this time.
0 commit comments