TypePHP 编译器
https://swoole.com/aot/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
663 B
42 lines
663 B
<?php
|
|
|
|
namespace TypePhp\Platform;
|
|
|
|
/**
|
|
* Linux 平台实现
|
|
*/
|
|
class Linux extends UnixPlatform
|
|
{
|
|
public function getName(): string
|
|
{
|
|
return 'Linux';
|
|
}
|
|
|
|
public function isCurrent(): bool
|
|
{
|
|
return PHP_OS === 'Linux';
|
|
}
|
|
|
|
public function getSharedLibraryExtension(): string
|
|
{
|
|
return '.so';
|
|
}
|
|
|
|
public function getDefaultCompiler(): string
|
|
{
|
|
return 'g++';
|
|
}
|
|
|
|
public function getIntegerLiteralSuffix(): string
|
|
{
|
|
return 'L';
|
|
}
|
|
|
|
/**
|
|
* 获取共享库链接选项
|
|
*/
|
|
public function getSharedLinkFlag(): string
|
|
{
|
|
return '-shared';
|
|
}
|
|
}
|
|
|