pkg-config: support apple-clang@15: (#44007)

This commit is contained in:
Alec Scott 2024-05-14 08:24:36 -07:00 committed by GitHub
parent 410e6a59b7
commit c3576f712d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -53,17 +53,18 @@ def setup_dependent_build_environment(self, env, dependent_spec):
env.append_path("ACLOCAL_PATH", self.prefix.share.aclocal)
def configure_args(self):
spec = self.spec
config_args = ["--enable-shared"]
if "+internal_glib" in self.spec:
if spec.satisfies("+internal_glib"):
# There's a bootstrapping problem here;
# glib uses pkg-config as well, so break
# the cycle by using the internal glib.
config_args.append("--with-internal-glib")
c_name = self.spec.compiler.name
if "oneapi" in c_name or "cce" in c_name:
# Don't treat int-conversion warning as error with oneapi and cce.
config_args.append("CFLAGS=-Wno-error=int-conversion")
for strict_compiler in ("%oneapi", "%cce", "%apple-clang@15:", "%clang@15:"):
if spec.satisfies(strict_compiler):
config_args.append("CFLAGS=-Wno-error=int-conversion")
break
return config_args