Skip to content

Commit c051a48

Browse files
committed
don't add -l:libstdc++.a if we're not actually using gcc/clang
1 parent b965ffc commit c051a48

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/SPC/builder/extension/imagick.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
namespace SPC\builder\extension;
66

77
use SPC\builder\Extension;
8+
use SPC\toolchain\ToolchainManager;
9+
use SPC\toolchain\ZigToolchain;
810
use SPC\util\CustomExt;
911

1012
#[CustomExt('imagick')]
@@ -19,7 +21,7 @@ public function getUnixConfigureArg(bool $shared = false): string
1921
protected function splitLibsIntoStaticAndShared(string $allLibs): array
2022
{
2123
[$static, $shared] = parent::splitLibsIntoStaticAndShared($allLibs);
22-
if (str_contains(getenv('PATH'), 'rh/devtoolset') || str_contains(getenv('PATH'), 'rh/gcc-toolset')) {
24+
if (ToolchainManager::getToolchainClass() !== ZigToolchain::class && str_contains(getenv('PATH'), 'rh/devtoolset') || str_contains(getenv('PATH'), 'rh/gcc-toolset')) {
2325
$static .= ' -l:libstdc++.a';
2426
$shared = str_replace('-lstdc++', '', $shared);
2527
}

0 commit comments

Comments
 (0)