mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
suggestion
This commit is contained in:
parent
ee906aaff9
commit
8e4d4b7be5
@ -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()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user