mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-10 02:15:36 +08:00
suggestion
This commit is contained in:
@@ -5,6 +5,7 @@ declare(strict_types=1);
|
|||||||
namespace SPC\builder\unix;
|
namespace SPC\builder\unix;
|
||||||
|
|
||||||
use SPC\builder\BuilderBase;
|
use SPC\builder\BuilderBase;
|
||||||
|
use SPC\builder\linux\SystemUtil;
|
||||||
use SPC\builder\linux\SystemUtil as LinuxSystemUtil;
|
use SPC\builder\linux\SystemUtil as LinuxSystemUtil;
|
||||||
use SPC\exception\SPCException;
|
use SPC\exception\SPCException;
|
||||||
use SPC\exception\SPCInternalException;
|
use SPC\exception\SPCInternalException;
|
||||||
@@ -105,10 +106,9 @@ abstract class UnixBuilderBase extends BuilderBase
|
|||||||
if (PHP_OS_FAMILY === 'Darwin') {
|
if (PHP_OS_FAMILY === 'Darwin') {
|
||||||
shell()->exec("dsymutil -f {$binary_path} -o {$debug_file}");
|
shell()->exec("dsymutil -f {$binary_path} -o {$debug_file}");
|
||||||
} elseif (PHP_OS_FAMILY === 'Linux') {
|
} elseif (PHP_OS_FAMILY === 'Linux') {
|
||||||
$has_eu_strip = shell()->execWithResult('which eu-strip')[0] === 0;
|
if ($eu_strip = SystemUtil::findCommand('eu-strip')) {
|
||||||
if ($has_eu_strip) {
|
|
||||||
shell()
|
shell()
|
||||||
->exec("eu-strip -f {$debug_file} {$binary_path}")
|
->exec("{$eu_strip} -f {$debug_file} {$binary_path}")
|
||||||
->exec("objcopy --add-gnu-debuglink={$debug_file} {$binary_path}");
|
->exec("objcopy --add-gnu-debuglink={$debug_file} {$binary_path}");
|
||||||
} else {
|
} else {
|
||||||
shell()
|
shell()
|
||||||
|
|||||||
Reference in New Issue
Block a user