go's gcc driver is the dumbest shit to ever exist

This commit is contained in:
DubbleClick 2025-08-25 11:21:08 +07:00
parent e975e151f9
commit 779a724875

View File

@ -8,6 +8,9 @@ use SPC\builder\BuilderBase;
use SPC\builder\BuilderProvider;
use SPC\exception\WrongUsageException;
use SPC\store\Config;
use SPC\toolchain\ClangNativeToolchain;
use SPC\toolchain\GccNativeToolchain;
use SPC\toolchain\ToolchainManager;
use Symfony\Component\Console\Input\ArgvInput;
class SPCConfigUtil
@ -78,6 +81,9 @@ class SPCConfigUtil
if (SPCTarget::getTargetOS() === 'Darwin') {
$libs .= " {$this->getFrameworksString($extensions)}";
}
if (str_contains((string) getenv('SPC_DEFAULT_C_FLAGS'), '-fprofile') && ToolchainManager::getToolchainClass() === GccNativeToolchain::class) {
$libs .= ' -lgcov';
}
if ($this->builder->hasCpp()) {
$libcpp = SPCTarget::getTargetOS() === 'Darwin' ? '-lc++' : '-lstdc++';
$libs = str_replace($libcpp, '', $libs) . " {$libcpp}";