summaryrefslogtreecommitdiff
path: root/numpy/distutils/tests
diff options
context:
space:
mode:
authorSayed Adel <seiko@imavr.com>2021-12-15 16:01:29 +0200
committerSayed Adel <seiko@imavr.com>2021-12-15 16:43:30 +0200
commit3e8123046a686b952e3c624b00b3502406033339 (patch)
treebb73cc6c343b9c53f902d5b7e114d97c69b81600 /numpy/distutils/tests
parent8111d51af2c743c1ff90dc014ede49564a8f22d9 (diff)
downloadnumpy-3e8123046a686b952e3c624b00b3502406033339.tar.gz
BUG, DIST: fix normalize IBMZ features flags
The normal behavior is to erase any flag that starts with `-m[a-z0-9\-\.]` when flag `-march` or `-mcpu` specified. for example: cc_normalize_flags([ '-msse', '-msse2', '-msse3', '-mssse3', '-march=core-avx2' ]) should be normalized to: ['-march=core-avx2'] but in the case of `s390x`, on GCC flag `-march=arch[0-9]` doesn't implies flag `-mzvector` which is required to enable zvector api. for example: cc_normalize_flags([ '-mzvector', '-march=arch11', '-march=arch12', '-march=arch13'] ) should be normalized to: ['-mzvector', '-march=arch13'] instead of: ['-march=arch13']
Diffstat (limited to 'numpy/distutils/tests')
-rw-r--r--numpy/distutils/tests/test_ccompiler_opt.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/numpy/distutils/tests/test_ccompiler_opt.py b/numpy/distutils/tests/test_ccompiler_opt.py
index 6d42cc172..6f9970c75 100644
--- a/numpy/distutils/tests/test_ccompiler_opt.py
+++ b/numpy/distutils/tests/test_ccompiler_opt.py
@@ -443,7 +443,7 @@ class _Test_CCompilerOpt:
ppc64_clang="-maltivec -mvsx -mpower8-vector",
armhf_gcc="-mfpu=neon-fp16 -mfp16-format=ieee",
aarch64="",
- s390="-mzvector -march=arch12"
+ s390x="-mzvector -march=arch12"
)
# testing normalize -march
self.expect_flags(
@@ -467,6 +467,10 @@ class _Test_CCompilerOpt:
"asimddp asimdhp asimdfhm",
aarch64_gcc=r"-march=armv8.2-a\+dotprod\+fp16\+fp16fml"
)
+ self.expect_flags(
+ "vx vxe vxe2",
+ s390x=r"-mzvector -march=arch13"
+ )
def test_targets_exceptions(self):
for targets in (