Remove SPC_NO_MUSL_PATH, remove --libc, use SPC_LIBC instead (#642)

* Remove SPC_NO_MUSL_PATH, remove --libc, use SPC_LIBC instead

* Fix tests

* Internally use GNU_ARCH for unified

* Update EXTENSION_DIR comments for env.ini

* Remove redundant -fPIC cflags in curl
This commit is contained in:
Jerry Ma
2025-03-14 18:22:50 +08:00
committed by GitHub
parent 91a3a01c39
commit b4f3657323
32 changed files with 80 additions and 117 deletions

View File

@@ -12,25 +12,12 @@ abstract class BuildCommand extends BaseCommand
{
parent::__construct($name);
switch (PHP_OS_FAMILY) {
case 'Windows':
$this->addOption('with-sdk-binary-dir', null, InputOption::VALUE_REQUIRED, 'path to binary sdk');
$this->addOption('vs-ver', null, InputOption::VALUE_REQUIRED, 'vs version, e.g. "17" for Visual Studio 2022');
$this->addOption('arch', null, InputOption::VALUE_REQUIRED, 'architecture, "x64" or "arm64"', 'x64');
break;
case 'Linux':
$this->addOption('libc', null, InputOption::VALUE_REQUIRED, 'glibc, musl or musl-wrapper', 'musl-wrapper');
// no break
case 'Darwin':
$this->addOption('cc', null, InputOption::VALUE_REQUIRED, 'C compiler');
$this->addOption('cxx', null, InputOption::VALUE_REQUIRED, 'C++ compiler');
$this->addOption('ar', null, InputOption::VALUE_REQUIRED, 'ar');
$this->addOption('ld', null, InputOption::VALUE_REQUIRED, 'ld');
$this->addOption('arch', null, InputOption::VALUE_REQUIRED, 'architecture', php_uname('m'));
break;
if (PHP_OS_FAMILY === 'Windows') {
$this->addOption('with-sdk-binary-dir', null, InputOption::VALUE_REQUIRED, 'path to binary sdk');
$this->addOption('vs-ver', null, InputOption::VALUE_REQUIRED, 'vs version, e.g. "17" for Visual Studio 2022');
}
$this->addOption('with-clean', null, null, 'fresh build, remove `source` dir before `make`');
$this->addOption('with-clean', null, null, 'fresh build, remove `source` and `buildroot` dir before build');
$this->addOption('bloat', null, null, 'add all libraries into binary');
$this->addOption('rebuild', 'r', null, 'Delete old build and rebuild');
$this->addOption('enable-zts', null, null, 'enable ZTS support');