Skip to content

Commit dcbfe1e

Browse files
committed
e-dant/watcher is a c++ library too
1 parent 44399cd commit dcbfe1e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

config/lib.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -869,6 +869,7 @@
869869
},
870870
"watcher": {
871871
"source": "watcher",
872+
"cpp-library": true,
872873
"static-libs-unix": [
873874
"libwatcher-c.a"
874875
],

src/SPC/builder/unix/UnixBuilderBase.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,19 +291,18 @@ protected function buildFrankenphp(): void
291291
}
292292
}
293293
$debugFlags = $this->getOption('no-strip') ? '-w -s ' : '';
294-
$extLdFlags = "-extldflags '-pie{$dynamic_exports}'";
294+
$extLdFlags = "-extldflags '-pie{$dynamic_exports} {$this->arch_ld_flags}'";
295295
$muslTags = '';
296296
$staticFlags = '';
297297
if (SPCTarget::isStatic()) {
298-
$extLdFlags = "-extldflags '-static-pie -Wl,-z,stack-size=0x80000{$dynamic_exports}'";
298+
$extLdFlags = "-extldflags '-static-pie -Wl,-z,stack-size=0x80000{$dynamic_exports} {$this->arch_ld_flags}'";
299299
$muslTags = 'static_build,';
300300
$staticFlags = '-static-pie';
301301
}
302302

303303
$config = (new SPCConfigUtil($this))->config($this->ext_list, $this->lib_list);
304304
$cflags = "{$this->arch_c_flags} {$config['cflags']} " . getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS');
305305
$libs = $config['libs'];
306-
$libs .= PHP_OS_FAMILY === 'Linux' ? ' -lrt' : '';
307306
// Go's gcc driver doesn't automatically link against -lgcov or -lrt. Ugly, but necessary fix.
308307
if ((str_contains((string) getenv('SPC_DEFAULT_C_FLAGS'), '-fprofile') ||
309308
str_contains((string) getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS'), '-fprofile')) &&

0 commit comments

Comments
 (0)