Skip to content

Commit b8080ea

Browse files
committed
Add macOS strip option -S, fix macOS micro strip option
1 parent a2f0640 commit b8080ea

File tree

2 files changed

+20
-17
lines changed

2 files changed

+20
-17
lines changed

src/SPC/builder/macos/MacOSBuilder.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ protected function buildCli(): void
207207
$SPC_CMD_PREFIX_PHP_MAKE = getenv('SPC_CMD_PREFIX_PHP_MAKE') ?: 'make';
208208
$shell->exec("{$SPC_CMD_PREFIX_PHP_MAKE} {$vars} cli");
209209
if (!$this->getOption('no-strip', false)) {
210-
$shell->exec('dsymutil -f sapi/cli/php')->exec('strip sapi/cli/php');
210+
$shell->exec('dsymutil -f sapi/cli/php')->exec('strip -S sapi/cli/php');
211211
}
212212
$this->deployBinary(BUILD_TARGET_CLI);
213213
}
@@ -234,12 +234,15 @@ protected function buildMicro(): void
234234

235235
// patch fake cli for micro
236236
$vars['EXTRA_CFLAGS'] .= $enable_fake_cli;
237-
if ($this->getOption('no-strip', false)) {
238-
$vars['STRIP'] = 'dsymutil -f ';
239-
}
240237
$vars = SystemUtil::makeEnvVarString($vars);
241238

242-
shell()->cd(SOURCE_PATH . '/php-src')->exec(getenv('SPC_CMD_PREFIX_PHP_MAKE') . " {$vars} micro");
239+
$shell = shell()->cd(SOURCE_PATH . '/php-src');
240+
// build
241+
$shell->exec(getenv('SPC_CMD_PREFIX_PHP_MAKE') . " {$vars} micro");
242+
// strip
243+
if (!$this->getOption('no-strip', false)) {
244+
$shell->exec('dsymutil -f sapi/micro/micro.sfx')->exec('strip -S sapi/micro/micro.sfx');
245+
}
243246

244247
$this->deployBinary(BUILD_TARGET_MICRO);
245248

@@ -261,7 +264,7 @@ protected function buildFpm(): void
261264
$shell = shell()->cd(SOURCE_PATH . '/php-src');
262265
$shell->exec(getenv('SPC_CMD_PREFIX_PHP_MAKE') . " {$vars} fpm");
263266
if (!$this->getOption('no-strip', false)) {
264-
$shell->exec('dsymutil -f sapi/fpm/php-fpm')->exec('strip sapi/fpm/php-fpm');
267+
$shell->exec('dsymutil -f sapi/fpm/php-fpm')->exec('strip -S sapi/fpm/php-fpm');
265268
}
266269
$this->deployBinary(BUILD_TARGET_FPM);
267270
}

src/globals/test-extensions.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313

1414
// test php version (8.1 ~ 8.4 available, multiple for matrix)
1515
$test_php_version = [
16-
// '8.1',
17-
// '8.2',
18-
// '8.3',
16+
'8.1',
17+
'8.2',
18+
'8.3',
1919
'8.4',
2020
];
2121

@@ -24,27 +24,27 @@
2424
'macos-13',
2525
// 'macos-14',
2626
'macos-15',
27-
'ubuntu-latest',
28-
'ubuntu-22.04',
29-
'ubuntu-24.04',
30-
'ubuntu-22.04-arm',
31-
'ubuntu-24.04-arm',
27+
// 'ubuntu-latest',
28+
// 'ubuntu-22.04',
29+
// 'ubuntu-24.04',
30+
// 'ubuntu-22.04-arm',
31+
// 'ubuntu-24.04-arm',
3232
// 'windows-latest',
3333
];
3434

3535
// whether enable thread safe
36-
$zts = true;
36+
$zts = false;
3737

3838
$no_strip = false;
3939

4040
// compress with upx
4141
$upx = false;
4242

4343
// whether to test frankenphp build, only available for macos and linux
44-
$frankenphp = true;
44+
$frankenphp = false;
4545

4646
// prefer downloading pre-built packages to speed up the build process
47-
$prefer_pre_built = false;
47+
$prefer_pre_built = true;
4848

4949
// If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`).
5050
$extensions = match (PHP_OS_FAMILY) {

0 commit comments

Comments
 (0)