Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,37 @@ if cc.get_argument_syntax() == 'msvc'
link_args = ['/NXCompat', '/DynamicBase']

if cc.get_id().startswith('intel')
# workaround for icx _Dcomplex regression, see numpy/numpy#31337
npy_complex_check = '''
#include <Python.h>
#include <numpy/npy_math.h>
'''
undef_llvm = '/U__INTEL_LLVM_COMPILER'

if not cc.compiles(
npy_complex_check,
name: 'numpy complex helpers build with icx',
dependencies: py_dep,
include_directories: inc_np
)
if cc.compiles(
npy_complex_check,
name: 'numpy complex helpers build with ' + undef_llvm,
args: undef_llvm,
dependencies: py_dep,
include_directories: inc_np
)
c_args += undef_llvm
else
error(
'numpy headers do not compile with icx on Windows: '
+ 'npy_cdouble conflicts with UCRT complex.h and '
+ undef_llvm + ' does not resolve it. '
+ 'See numpy/numpy#31337.'
)
endif
endif

c_args += [
'/Qimf-precision=high', '/Qprotect-parens',
'/clang:-fveclib=SVML', '/clang:-fvectorize'
Expand Down
Loading