mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-19 13:24:51 +08:00
go's gcc driver is the dumbest shit to ever exist
This commit is contained in:
parent
e975e151f9
commit
779a724875
@ -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}";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user