compilers: add .stdcxx_libs to the compiler adaptor (#49873)

This property is used by a few recipes, including `cp2k` under
certain configurations

Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
This commit is contained in:
Massimiliano Culpo 2025-04-07 15:39:13 +02:00 committed by GitHub
parent e5ec08771b
commit 081e4c463b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 8 additions and 1 deletions

View File

@ -190,6 +190,10 @@ def f77(self):
self._lang_exists_or_raise("f77", lang=Languages.FORTRAN)
return self.compilers[Languages.FORTRAN].package.fortran
@property
def stdcxx_libs(self):
return self._maybe_return_attribute("stdcxx_libs", lang=Languages.CXX)
class DeprecatedCompiler(lang.DeprecatedProperty):
def __init__(self) -> None:

View File

@ -138,6 +138,7 @@ def cfg_files(self):
}
implicit_rpath_libs = ["libclang"]
stdcxx_libs = ("-lstdc++",)
def _standard_flag(self, *, language: str, standard: str) -> str:
flags = {

View File

@ -618,7 +618,7 @@ def supported_languages(self):
opt_flags = ["-O", "-O0", "-O1", "-O2", "-O3", "-Os", "-Ofast", "-Og"]
implicit_rpath_libs = ["libgcc", "libgfortran"]
stdcxx_libs = "-lstdc++"
stdcxx_libs = ("-lstdc++",)
def _standard_flag(self, *, language, standard):
flags = {

View File

@ -28,6 +28,8 @@ class Grackle(Package):
depends_on("libtool", when="@2.2:")
depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("fortran", type="build")
depends_on("tcsh", type="build")
depends_on("mpi")