mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-12 11:25:35 +08:00
go's gcc driver is the dumbest shit to ever exist
This commit is contained in:
@@ -8,6 +8,9 @@ use SPC\builder\BuilderBase;
|
|||||||
use SPC\builder\BuilderProvider;
|
use SPC\builder\BuilderProvider;
|
||||||
use SPC\exception\WrongUsageException;
|
use SPC\exception\WrongUsageException;
|
||||||
use SPC\store\Config;
|
use SPC\store\Config;
|
||||||
|
use SPC\toolchain\ClangNativeToolchain;
|
||||||
|
use SPC\toolchain\GccNativeToolchain;
|
||||||
|
use SPC\toolchain\ToolchainManager;
|
||||||
use Symfony\Component\Console\Input\ArgvInput;
|
use Symfony\Component\Console\Input\ArgvInput;
|
||||||
|
|
||||||
class SPCConfigUtil
|
class SPCConfigUtil
|
||||||
@@ -78,6 +81,9 @@ class SPCConfigUtil
|
|||||||
if (SPCTarget::getTargetOS() === 'Darwin') {
|
if (SPCTarget::getTargetOS() === 'Darwin') {
|
||||||
$libs .= " {$this->getFrameworksString($extensions)}";
|
$libs .= " {$this->getFrameworksString($extensions)}";
|
||||||
}
|
}
|
||||||
|
if (str_contains((string) getenv('SPC_DEFAULT_C_FLAGS'), '-fprofile') && ToolchainManager::getToolchainClass() === GccNativeToolchain::class) {
|
||||||
|
$libs .= ' -lgcov';
|
||||||
|
}
|
||||||
if ($this->builder->hasCpp()) {
|
if ($this->builder->hasCpp()) {
|
||||||
$libcpp = SPCTarget::getTargetOS() === 'Darwin' ? '-lc++' : '-lstdc++';
|
$libcpp = SPCTarget::getTargetOS() === 'Darwin' ? '-lc++' : '-lstdc++';
|
||||||
$libs = str_replace($libcpp, '', $libs) . " {$libcpp}";
|
$libs = str_replace($libcpp, '', $libs) . " {$libcpp}";
|
||||||
|
|||||||
Reference in New Issue
Block a user