SPC_DEFAULT_CXX_FLAGS renamed to SPC_DEFAULT_CXXFLAGS

This commit is contained in:
crazywhalecc
2026-05-07 14:55:45 +08:00
parent 506cb15654
commit 9e4a622f42
3 changed files with 8 additions and 8 deletions

View File

@@ -142,8 +142,8 @@ class LibraryPackage extends Package
// get environment variable
$env = getenv($this->getSnakeCaseName() . '_CXXFLAGS') ?: '';
// get default cxx flags
$arch_cxx_flags = getenv('SPC_DEFAULT_CXX_FLAGS') ?: '';
if (!empty(getenv('SPC_DEFAULT_CXX_FLAGS')) && !str_contains($env, $arch_cxx_flags)) {
$arch_cxx_flags = getenv('SPC_DEFAULT_CXXFLAGS') ?: '';
if (!empty(getenv('SPC_DEFAULT_CXXFLAGS')) && !str_contains($env, $arch_cxx_flags)) {
$env .= ' ' . $arch_cxx_flags;
}
return trim($env);