mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-12 03:15:35 +08:00
remove zig specifics
This commit is contained in:
@@ -4,8 +4,6 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace SPC\builder\unix\library;
|
namespace SPC\builder\unix\library;
|
||||||
|
|
||||||
use SPC\toolchain\ToolchainManager;
|
|
||||||
use SPC\toolchain\ZigToolchain;
|
|
||||||
use SPC\util\executor\UnixCMakeExecutor;
|
use SPC\util\executor\UnixCMakeExecutor;
|
||||||
use SPC\util\SPCTarget;
|
use SPC\util\SPCTarget;
|
||||||
|
|
||||||
@@ -13,13 +11,6 @@ trait libjxl
|
|||||||
{
|
{
|
||||||
protected function build(): void
|
protected function build(): void
|
||||||
{
|
{
|
||||||
if (ToolchainManager::getToolchainClass() === ZigToolchain::class) {
|
|
||||||
if (str_contains(getenv('SPC_TARGET'), '.2.')) {
|
|
||||||
throw new \RuntimeException('Zig toolchain does not support libjxl with target version.');
|
|
||||||
}
|
|
||||||
putenv('CC=gcc');
|
|
||||||
putenv('CXX=g++');
|
|
||||||
}
|
|
||||||
UnixCMakeExecutor::create($this)
|
UnixCMakeExecutor::create($this)
|
||||||
->addConfigureArgs(
|
->addConfigureArgs(
|
||||||
'-DJPEGXL_ENABLE_TOOLS=OFF',
|
'-DJPEGXL_ENABLE_TOOLS=OFF',
|
||||||
@@ -35,9 +26,5 @@ trait libjxl
|
|||||||
'-DBUILD_TESTING=OFF'
|
'-DBUILD_TESTING=OFF'
|
||||||
)
|
)
|
||||||
->build();
|
->build();
|
||||||
if (ToolchainManager::getToolchainClass() === ZigToolchain::class) {
|
|
||||||
putenv('CC=zig-cc');
|
|
||||||
putenv('CXX=zig-c++');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user