8000 BUG: Fix headers for universal2 builds by isuruf · Pull Request #20270 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

BUG: Fix headers for universal2 builds #20270

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 1, 2021
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
13 changes: 13 additions & 0 deletions numpy/core/include/numpy/numpyconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,19 @@
#define NPY_SIZEOF_LONG 4
#define NPY_SIZEOF_PY_INTPTR_T 4
#endif

#undef NPY_SIZEOF_LONGDOUBLE
#undef NPY_SIZEOF_COMPLEX_LONGDOUBLE

#ifdef __x86_64
#define NPY_SIZEOF_LONGDOUBLE 16
#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32
#elif defined(__arm64__)
#define NPY_SIZEOF_LONGDOUBLE 8
#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 16
Copy link
Member

Choose a reason for hiding this comment

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

I am trying to build with the macos-provided clang and getting weird errors because of this. @isuruf Shouldn't this be 16/32?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@isuruf Shouldn't this be 16/32?

No, long double is equivalent to double on macos-arm64

#else
#error "unknown architecture"
#endif
#endif

/**
Expand Down
0