mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-05 15:55:39 +08:00
fix test
This commit is contained in:
@@ -94,6 +94,7 @@ class LinuxBuilder extends UnixBuilderBase
|
||||
'CFLAGS' => getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS'),
|
||||
'CPPFLAGS' => '-I' . BUILD_INCLUDE_PATH, // . ' -Dsomethinghere', // . $musl_flag,
|
||||
'LDFLAGS' => '-L' . BUILD_LIB_PATH,
|
||||
'LD_LIBRARY_PATH' => BUILD_LIB_PATH,
|
||||
// 'LIBS' => SPCTarget::getRuntimeLibs(), // do not pass static libraries here yet, they may contain polyfills for libc functions!
|
||||
]);
|
||||
|
||||
|
||||
@@ -58,6 +58,10 @@ class ZigToolchain implements ToolchainInterface
|
||||
GlobalEnvManager::putenv("SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS={$extraCflags}");
|
||||
GlobalEnvManager::putenv('RANLIB=zig-ranlib');
|
||||
GlobalEnvManager::putenv('OBJCOPY=zig-objcopy');
|
||||
$defaultLdFlags = getenv('SPC_DEFAULT_LD_FLAGS') ?: '';
|
||||
if (!str_contains($defaultLdFlags, '-Wl,--undefined-version') && !getenv('SPC_LINK_STATIC')) {
|
||||
GlobalEnvManager::putenv("SPC_DEFAULT_LD_FLAGS={$defaultLdFlags} -Wl,--undefined-version");
|
||||
}
|
||||
$extra_libs = getenv('SPC_EXTRA_LIBS') ?: '';
|
||||
if (!str_contains($extra_libs, '-lunwind')) {
|
||||
// Add unwind library if not already present
|
||||
|
||||
Reference in New Issue
Block a user