mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-08 01:15:37 +08:00
don't add fno-sanitize=undefined for library builds
This commit is contained in:
@@ -35,10 +35,6 @@ class ZigToolchain implements UnixToolchainInterface
|
||||
GlobalEnvManager::putenv("SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS={$extraCflags}");
|
||||
GlobalEnvManager::putenv('RANLIB=zig-ranlib');
|
||||
GlobalEnvManager::putenv('OBJCOPY=zig-objcopy');
|
||||
$compiler_extra = getenv('SPC_COMPILER_EXTRA') ?: '';
|
||||
if (!str_contains($compiler_extra, '-fno-sanitize=undefined')) {
|
||||
GlobalEnvManager::putenv('SPC_COMPILER_EXTRA=' . trim($compiler_extra . ' -fno-sanitize=undefined'));
|
||||
}
|
||||
$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