Skip to content

Commit 0807e9e

Browse files
committed
watcher: drop ldflags from compile-only invocation
The shell invocation runs `$CXX -c` to compile watcher-c.cpp to a .o, which never links. Passing linker flags to a compile-only step is either ignored or, with some flags, an error. Drop them.
1 parent 7ae5d74 commit 0807e9e

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/Package/Library/watcher.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ public function build(): void
2020
if (stripos($cflags, '-fpic') === false) {
2121
$cflags .= ' -fPIC';
2222
}
23-
$ldflags = $this->getLibExtraLdFlags() ? ' ' . $this->getLibExtraLdFlags() : '';
2423
shell()->cd("{$this->getSourceDir()}/watcher-c")
25-
->exec(getenv('CXX') . " -c -o libwatcher-c.o ./src/watcher-c.cpp -I ./include -I ../include -std=c++17 -Wall -Wextra {$cflags}{$ldflags}")
24+
->exec(getenv('CXX') . " -c -o libwatcher-c.o ./src/watcher-c.cpp -I ./include -I ../include -std=c++17 -Wall -Wextra {$cflags}")
2625
->exec(getenv('AR') . ' rcs libwatcher-c.a libwatcher-c.o');
2726

2827
copy("{$this->getSourceDir()}/watcher-c/libwatcher-c.a", "{$this->getLibDir()}/libwatcher-c.a");

0 commit comments

Comments
 (0)