mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
don't add -liconv on linux (cannot find library when specified that way in extra_libs)
This commit is contained in:
parent
658e8e74bd
commit
64dfb57366
@ -5,6 +5,7 @@ declare(strict_types=1);
|
|||||||
namespace SPC\builder\extension;
|
namespace SPC\builder\extension;
|
||||||
|
|
||||||
use SPC\builder\Extension;
|
use SPC\builder\Extension;
|
||||||
|
use SPC\builder\macos\MacOSBuilder;
|
||||||
use SPC\util\CustomExt;
|
use SPC\util\CustomExt;
|
||||||
|
|
||||||
#[CustomExt('iconv')]
|
#[CustomExt('iconv')]
|
||||||
@ -13,6 +14,9 @@ class iconv extends Extension
|
|||||||
public function patchBeforeConfigure(): bool
|
public function patchBeforeConfigure(): bool
|
||||||
{
|
{
|
||||||
// macOS need to link iconv dynamically, we add it to extra-libs
|
// macOS need to link iconv dynamically, we add it to extra-libs
|
||||||
|
if (!$this->builder instanceof MacOSBuilder) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
$extra_libs = $this->builder->getOption('extra-libs', '');
|
$extra_libs = $this->builder->getOption('extra-libs', '');
|
||||||
if (!str_contains($extra_libs, '-liconv')) {
|
if (!str_contains($extra_libs, '-liconv')) {
|
||||||
$extra_libs .= ' -liconv';
|
$extra_libs .= ' -liconv';
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user