fix lib extra cflags

This commit is contained in:
DubbleClick 2025-06-27 19:25:29 +07:00
parent d2dea83c63
commit e6bec8eb57

View File

@ -119,9 +119,9 @@ trait UnixLibraryTrait
{ {
$env = getenv($this->getSnakeCaseName() . '_CFLAGS') ?: ''; $env = getenv($this->getSnakeCaseName() . '_CFLAGS') ?: '';
if (!str_contains($env, $this->builder->arch_c_flags)) { if (!str_contains($env, $this->builder->arch_c_flags)) {
$env .= $this->builder->arch_c_flags; $env .= ' ' .$this->builder->arch_c_flags;
} }
return $env; return trim($env);
} }
public function getLibExtraLdFlags(): string public function getLibExtraLdFlags(): string
@ -138,8 +138,8 @@ trait UnixLibraryTrait
{ {
$env = getenv($this->getSnakeCaseName() . '_CXXFLAGS') ?: ''; $env = getenv($this->getSnakeCaseName() . '_CXXFLAGS') ?: '';
if (!str_contains($env, $this->builder->arch_cxx_flags)) { 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);
} }
} }