only feed -lgcov to the go driver

This commit is contained in:
DubbleClick
2025-08-25 18:44:03 +07:00
parent efdfbf437a
commit 868f6d408b
2 changed files with 10 additions and 6 deletions

View File

@@ -8,8 +8,6 @@ use SPC\builder\BuilderBase;
use SPC\builder\BuilderProvider;
use SPC\exception\WrongUsageException;
use SPC\store\Config;
use SPC\toolchain\GccNativeToolchain;
use SPC\toolchain\ToolchainManager;
use Symfony\Component\Console\Input\ArgvInput;
class SPCConfigUtil
@@ -89,9 +87,6 @@ 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}";