mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 12:54:52 +08:00
Add XXX_CXXFLAGS for common build
This commit is contained in:
parent
0558d67240
commit
1c1f7b19dd
@ -118,4 +118,13 @@ trait UnixLibraryTrait
|
|||||||
{
|
{
|
||||||
return getenv($this->getSnakeCaseName() . '_LIBS') ?: '';
|
return getenv($this->getSnakeCaseName() . '_LIBS') ?: '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getLibExtraCXXFlags(): string
|
||||||
|
{
|
||||||
|
$env = getenv($this->getSnakeCaseName() . '_CXXFLAGS') ?: '';
|
||||||
|
if (!str_contains($env, $this->builder->arch_cxx_flags)) {
|
||||||
|
$env .= $this->builder->arch_cxx_flags;
|
||||||
|
}
|
||||||
|
return $env;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -70,6 +70,7 @@ class UnixShell
|
|||||||
'CFLAGS' => $library->getLibExtraCFlags(),
|
'CFLAGS' => $library->getLibExtraCFlags(),
|
||||||
'LDFLAGS' => $library->getLibExtraLdFlags(),
|
'LDFLAGS' => $library->getLibExtraLdFlags(),
|
||||||
'LIBS' => $library->getLibExtraLibs(),
|
'LIBS' => $library->getLibExtraLibs(),
|
||||||
|
'CXXFLAGS' => $library->getLibExtraCXXFlags(),
|
||||||
]);
|
]);
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user