Skip to content

BLD/MAINT: improve support for Intel LLVM compilers#31389

Merged
seberg merged 1 commit into
numpy:mainfrom
rgommers:intel-compiler-fixes
May 5, 2026
Merged

BLD/MAINT: improve support for Intel LLVM compilers#31389
seberg merged 1 commit into
numpy:mainfrom
rgommers:intel-compiler-fixes

Conversation

@rgommers
Copy link
Copy Markdown
Member

@rgommers rgommers commented May 5, 2026

With these changes, downstream users wanting to use the Intel compilers can do so when linking against NumPy headers.

Also include a build change for NumPy itself that is clearly correct: Intel compilers do not use _Fcomplex & co for complex types, but the regular C99 complex.h types.

Taken over from PR gh-25044

Closes gh-25044
Closes gh-31337 (reports the same _Fcomplex issue)

Note: I decided to start fresh because gh-25044 accumulated a conflict, and while most of that PR should no longer be relevant, I didn't want to just push a commit to remove that code. This is the most important and the clearly correct part of that PR, and there's no reason that wasn't merged already.

AI Disclosure

No AI usage

With these changes, downstream users wanting to use the Intel compilers
can do so when linking against NumPy headers.

Also include a build change for NumPy itself that is clearly correct:
Intel compilers do not use `_Fcomplex` & co for complex types, but
the regular C99 complex.h types.

Taken over from PR 25044

Closes numpygh-25044
Closes numpygh-31337 (reports the same `_Fcomplex` issue)

Co-authored-by: Matti Picus <[email protected]>
@rgommers rgommers added 00 - Bug 09 - Backport-Candidate PRs tagged should be backported 36 - Build Build related PR labels May 5, 2026
@rgommers rgommers added this to the 2.5.0 Release milestone May 5, 2026
@rgommers rgommers requested a review from mattip May 5, 2026 09:23
Copy link
Copy Markdown
Member

@seberg seberg left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM, and as per discussion on the issue an important fix for intel compilers.

@seberg seberg merged commit 0f897ea into numpy:main May 5, 2026
84 of 86 checks passed
@rgommers rgommers deleted the intel-compiler-fixes branch May 5, 2026 10:38
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label May 5, 2026
typedef _Fcomplex npy_cfloat;
typedef _Lcomplex npy_clongdouble;
#else /* !defined(_MSC_VER) || defined(__INTEL_COMPILER) */
#else /* !defined(_MSC_VER) || defined(__INTEL_COMPILER) && !defined(__INTEL_LLVM_COMPILER) */
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

minor: I suppose the final conditional in the comment should be inverted like its neighbors relative to above with a preceding ||

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ah indeed. Doesn't matter much since it's just a comment; I was just in too much of a hurry it looks like. Not sure why the comment is even there, deleting it seems cleaner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

00 - Bug 36 - Build Build related PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Failed to build numpy on Windows using intel compiler

4 participants