mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-07 08:45:40 +08:00
Merge branch 'main' into php-85
# Conflicts: # src/SPC/builder/linux/LinuxBuilder.php # src/SPC/store/source/PhpSource.php # src/globals/test-extensions.php
This commit is contained in:
@@ -92,27 +92,31 @@ trait UnixLibraryTrait
|
||||
{
|
||||
$env = getenv($this->getSnakeCaseName() . '_CFLAGS') ?: '';
|
||||
if (!str_contains($env, $this->builder->arch_c_flags)) {
|
||||
$env .= $this->builder->arch_c_flags;
|
||||
$env .= ' ' . $this->builder->arch_c_flags;
|
||||
}
|
||||
return $env;
|
||||
}
|
||||
|
||||
public function getLibExtraLdFlags(): string
|
||||
{
|
||||
return getenv($this->getSnakeCaseName() . '_LDFLAGS') ?: '';
|
||||
}
|
||||
|
||||
public function getLibExtraLibs(): string
|
||||
{
|
||||
return getenv($this->getSnakeCaseName() . '_LIBS') ?: '';
|
||||
return trim($env);
|
||||
}
|
||||
|
||||
public function getLibExtraCXXFlags(): string
|
||||
{
|
||||
$env = getenv($this->getSnakeCaseName() . '_CXXFLAGS') ?: '';
|
||||
if (!str_contains($env, $this->builder->arch_cxx_flags)) {
|
||||
$env .= $this->builder->arch_cxx_flags;
|
||||
$env .= ' ' . $this->builder->arch_cxx_flags;
|
||||
}
|
||||
return $env;
|
||||
return trim($env);
|
||||
}
|
||||
|
||||
public function getLibExtraLdFlags(): string
|
||||
{
|
||||
$env = getenv($this->getSnakeCaseName() . '_LDFLAGS') ?: '';
|
||||
if (!str_contains($env, $this->builder->arch_ld_flags)) {
|
||||
$env .= ' ' . $this->builder->arch_ld_flags;
|
||||
}
|
||||
return trim($env);
|
||||
}
|
||||
|
||||
public function getLibExtraLibs(): string
|
||||
{
|
||||
return getenv($this->getSnakeCaseName() . '_LIBS') ?: '';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user