mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-06 00:05:42 +08:00
Use existing pkg-config builds and pre-built contents for packages
This commit is contained in:
@@ -5,9 +5,7 @@ declare(strict_types=1);
|
||||
namespace SPC\toolchain;
|
||||
|
||||
use SPC\builder\linux\SystemUtil;
|
||||
use SPC\exception\EnvironmentException;
|
||||
use SPC\exception\WrongUsageException;
|
||||
use SPC\store\pkg\PkgConfig;
|
||||
use SPC\util\GlobalEnvManager;
|
||||
use SPC\util\SPCTarget;
|
||||
|
||||
@@ -58,10 +56,6 @@ class ToolchainManager
|
||||
if (SPCTarget::getLibc() === 'glibc' && SystemUtil::isMuslDist()) {
|
||||
throw new WrongUsageException('You are linking against glibc dynamically, which is only supported on glibc distros.');
|
||||
}
|
||||
if (!is_dir(PkgConfig::getEnvironment()['PATH'])) {
|
||||
throw new EnvironmentException('Please install pkg-config first. (You can use `doctor` command to install it)');
|
||||
}
|
||||
GlobalEnvManager::addPathIfNotExists(PkgConfig::getEnvironment()['PATH']);
|
||||
$toolchain = getenv('SPC_TOOLCHAIN');
|
||||
/* @var ToolchainInterface $toolchain */
|
||||
$instance = new $toolchain();
|
||||
|
||||
Reference in New Issue
Block a user