py-numcodecs: fix broken sse / avx2 variables (#40754)

This commit is contained in:
Harmen Stoppels 2023-10-29 19:45:23 +01:00 committed by GitHub
parent a1282337c0
commit 2e097b4cbd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -49,10 +49,11 @@ def setup_build_environment(self, env):
# This package likes to compile natively by checking cpu features and then setting flags
# -msse2 and -mavx2, which we want to avoid in Spack. This could go away if the package
# supports external libraries.
if "avx2" not in self.spec.target.features:
env.set("DISABLE_NUMCODECS_AVX2", "1")
if "sse2" not in self.spec.target.features:
env.set("DISABLE_NUMCODECS_SSE2", "1")
if self.spec.satisfies("target=x86_64:"):
if "avx2" not in self.spec.target.features:
env.set("DISABLE_NUMCODECS_AVX2", "1")
if "sse2" not in self.spec.target.features:
env.set("DISABLE_NUMCODECS_SSE2", "1")
def flag_handler(self, name, flags):
if name == "cflags":