From d5ce2f874192cd02a6c05e4291706da6298fa621 Mon Sep 17 00:00:00 2001 From: Ralf Gommers Date: Fri, 18 Oct 2024 10:12:31 +0200 Subject: [PATCH] BLD: treat SVML object files better to avoid compiler warnings GCC and Clang didn't mind passing unused compile flags when building object files, but the OneAPI Intel compilers emit warnings like: ``` [422/593] Compiling C object numpy/_core/_multiarray_umath.cpython-311-x86_64-linux-gnu.so.p/src_umath_svml_linux_avx512_svml_z0_asin_d_la.s.o icx: warning: argument unused during compilation: '-fvisibility=hidden' [-Wunused-command-line-argument] icx: warning: argument unused during compilation: '-fdiagnostics-color=always' [-Wunused-command-line-argument] icx: warning: argument unused during compilation: '-fno-strict-aliasing' [-Wunused-command-line-argument] icx: warning: argument unused during compilation: '-D NPY_HAVE_SSE2' [-Wunused-command-line-argument] ``` --- numpy/_core/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/numpy/_core/meson.build b/numpy/_core/meson.build index 3d4ef36c055c..a612f98b20cf 100644 --- a/numpy/_core/meson.build +++ b/numpy/_core/meson.build @@ -1213,7 +1213,8 @@ py.extension_module('_multiarray_umath', src_numpy_api[1], # __multiarray_api.h src_umath_doc_h, npy_math_internal_h, - ] + svml_objects, + ], + objects: svml_objects, c_args: c_args_common, cpp_args: cpp_args_common, include_directories: [