Skip to content

Commit 9257da9

Browse files
authored
Update Builder.php
1 parent 8762b4b commit 9257da9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

console/src/Builder.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ public function link()
233233
}
234234

235235
$link_option = ' -L./lib';
236-
$libs = trim(`php-config --libs`);
236+
$libs = self::PHPX_LFLAGS;
237237
$ldflags = trim(`php-config --ldflags`);
238238

239239
/**
@@ -243,15 +243,14 @@ public function link()
243243

244244
if ($this->isExtension()) {
245245
$link_option .= ' -shared';
246-
$libs .= " " . self::PHPX_LFLAGS;
247246
/**
248247
* MacOS 需要增加连接参数
249248
*/
250249
if (strcasecmp(PHP_OS, "Darwin") === 0) {
251250
$link_option .= " -undefined dynamic_lookup";
252251
}
253252
} else {
254-
$libs .= " " . self::PHPX_LFLAGS . ' -lphp7';
253+
$libs .= ' -lphp7';
255254
}
256255

257256
$this->exec(self::CXX . " $objects {$ldflags} {$libs} {$this->ldflags} {$link_option} -o {$this->target}");

0 commit comments

Comments
 (0)