Skip to content

Commit 8ed68f4

Browse files
committed
don't pass unused envs
1 parent b1abff6 commit 8ed68f4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/SPC/builder/linux/LinuxBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,12 +377,12 @@ private function getMakeExtraVars(): array
377377
$config = (new SPCConfigUtil($this, ['libs_only_deps' => true, 'absolute_libs' => true]))->config($this->ext_list, $this->lib_list, $this->getOption('with-suggested-exts'), $this->getOption('with-suggested-libs'));
378378
$static = SPCTarget::isStatic() ? '-all-static' : '';
379379
$lib = BUILD_LIB_PATH;
380-
return [
380+
return array_filter([
381381
'EXTRA_CFLAGS' => getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS'),
382382
'EXTRA_LIBS' => $config['libs'],
383383
'EXTRA_LDFLAGS' => getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS'),
384384
'EXTRA_LDFLAGS_PROGRAM' => "-L{$lib} {$static} -pie",
385-
];
385+
]);
386386
}
387387

388388
/**

src/SPC/builder/macos/MacOSBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,10 +281,10 @@ protected function buildEmbed(): void
281281
private function getMakeExtraVars(): array
282282
{
283283
$config = (new SPCConfigUtil($this, ['libs_only_deps' => true]))->config($this->ext_list, $this->lib_list, $this->getOption('with-suggested-exts'), $this->getOption('with-suggested-libs'));
284-
return [
284+
return array_filter([
285285
'EXTRA_CFLAGS' => getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS'),
286286
'EXTRA_LDFLAGS_PROGRAM' => '-L' . BUILD_LIB_PATH,
287287
'EXTRA_LIBS' => $config['libs'],
288-
];
288+
]);
289289
}
290290
}

0 commit comments

Comments
 (0)