Skip to content
Open
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
33 changes: 33 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,39 @@ if cc.get_argument_syntax() == 'msvc'
]
link_args = ['/NXCompat', '/DynamicBase']

if cc.get_id() == 'intel-llvm-cl'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have if cc.get_id().startswith('intel') below, shouldn't we reuse it?

# 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
endif
Comment thread
vchamarthi marked this conversation as resolved.

if cc.get_id().startswith('intel')
c_args += [
'/Qimf-precision=high', '/Qprotect-parens',
Expand Down
Loading