From 9257da988b4fd67a9b98455fe9fad2c4d5bb6ff7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9F=A9=E5=A4=A9=E5=B3=B0-Rango?= Date: Tue, 8 Oct 2019 22:20:40 +0800 Subject: [PATCH] Update Builder.php --- console/src/Builder.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/console/src/Builder.php b/console/src/Builder.php index 5a207736..bf1716c7 100755 --- a/console/src/Builder.php +++ b/console/src/Builder.php @@ -233,7 +233,7 @@ public function link() } $link_option = ' -L./lib'; - $libs = trim(`php-config --libs`); + $libs = self::PHPX_LFLAGS; $ldflags = trim(`php-config --ldflags`); /** @@ -243,7 +243,6 @@ public function link() if ($this->isExtension()) { $link_option .= ' -shared'; - $libs .= " " . self::PHPX_LFLAGS; /** * MacOS 需要增加连接参数 */ @@ -251,7 +250,7 @@ public function link() $link_option .= " -undefined dynamic_lookup"; } } else { - $libs .= " " . self::PHPX_LFLAGS . ' -lphp7'; + $libs .= ' -lphp7'; } $this->exec(self::CXX . " $objects {$ldflags} {$libs} {$this->ldflags} {$link_option} -o {$this->target}");