mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-04 23:35:40 +08:00
zig toolchain stuff
This commit is contained in:
@@ -10,6 +10,8 @@ use SPC\exception\RuntimeException;
|
||||
use SPC\exception\WrongUsageException;
|
||||
use SPC\store\FileSystem;
|
||||
use SPC\store\SourcePatcher;
|
||||
use SPC\toolchain\ToolchainManager;
|
||||
use SPC\toolchain\ZigToolchain;
|
||||
use SPC\util\GlobalEnvManager;
|
||||
|
||||
class LinuxBuilder extends UnixBuilderBase
|
||||
@@ -66,7 +68,7 @@ class LinuxBuilder extends UnixBuilderBase
|
||||
}
|
||||
// add libstdc++, some extensions or libraries need it
|
||||
$extra_libs .= (empty($extra_libs) ? '' : ' ') . ($this->hasCpp() ? '-lstdc++ ' : '');
|
||||
$extra_libs .= (SystemUtil::getCCType() === 'clang' ? ' -lunwind' : '');
|
||||
$extra_libs .= (ToolchainManager::getToolchainClass() === ZigToolchain::class ? ' -lunwind' : '');
|
||||
f_putenv('SPC_EXTRA_LIBS=' . $extra_libs);
|
||||
$cflags = $this->arch_c_flags;
|
||||
f_putenv('CFLAGS=' . $cflags);
|
||||
|
||||
Reference in New Issue
Block a user