Skip to content

Commit e6bec8e

Browse files
committed
fix lib extra cflags
1 parent d2dea83 commit e6bec8e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/SPC/builder/traits/UnixLibraryTrait.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ public function getLibExtraCFlags(): string
119119
{
120120
$env = getenv($this->getSnakeCaseName() . '_CFLAGS') ?: '';
121121
if (!str_contains($env, $this->builder->arch_c_flags)) {
122-
$env .= $this->builder->arch_c_flags;
122+
$env .= ' ' .$this->builder->arch_c_flags;
123123
}
124-
return $env;
124+
return trim($env);
125125
}
126126

127127
public function getLibExtraLdFlags(): string
@@ -138,8 +138,8 @@ public function getLibExtraCXXFlags(): string
138138
{
139139
$env = getenv($this->getSnakeCaseName() . '_CXXFLAGS') ?: '';
140140
if (!str_contains($env, $this->builder->arch_cxx_flags)) {
141-
$env .= $this->builder->arch_cxx_flags;
141+
$env .= ' ' . $this->builder->arch_cxx_flags;
142142
}
143-
return $env;
143+
return trim($env);
144144
}
145145
}

0 commit comments

Comments
 (0)