mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-09 18:05:36 +08:00
watcher: drop ldflags from compile-only invocation (#1161)
This commit is contained in:
@@ -20,9 +20,8 @@ class watcher extends LibraryPackage
|
|||||||
if (stripos($cflags, '-fpic') === false) {
|
if (stripos($cflags, '-fpic') === false) {
|
||||||
$cflags .= ' -fPIC';
|
$cflags .= ' -fPIC';
|
||||||
}
|
}
|
||||||
$ldflags = $this->getLibExtraLdFlags() ? ' ' . $this->getLibExtraLdFlags() : '';
|
|
||||||
shell()->cd("{$this->getSourceDir()}/watcher-c")
|
shell()->cd("{$this->getSourceDir()}/watcher-c")
|
||||||
->exec(getenv('CXX') . " -c -o libwatcher-c.o ./src/watcher-c.cpp -I ./include -I ../include -std=c++17 -Wall -Wextra {$cflags}{$ldflags}")
|
->exec(getenv('CXX') . " -c -o libwatcher-c.o ./src/watcher-c.cpp -I ./include -I ../include -std=c++17 -Wall -Wextra {$cflags}")
|
||||||
->exec(getenv('AR') . ' rcs libwatcher-c.a libwatcher-c.o');
|
->exec(getenv('AR') . ' rcs libwatcher-c.a libwatcher-c.o');
|
||||||
|
|
||||||
copy("{$this->getSourceDir()}/watcher-c/libwatcher-c.a", "{$this->getLibDir()}/libwatcher-c.a");
|
copy("{$this->getSourceDir()}/watcher-c/libwatcher-c.a", "{$this->getLibDir()}/libwatcher-c.a");
|
||||||
|
|||||||
Reference in New Issue
Block a user