Investigate vendoring SLEEF
Closed this issue · 1 comments
@mhvk added some instruction on how to build SLEEF, but I think we could also set up meson so it builds a version we vendor. That probably makes more sense than trying to keep up with upstream changes.
Make sense, so pre-builds available here https://github.com/SwayamInSync/numpy-user-dtypes/releases/tag/quaddtype-v0.0.9
are already precompiled with sleef (generated via a workflow that builds the sleef first and then package) but setting up meson should be doable and easier for source builds.
Although it is very straightforward, as building and installing sleef at system path is automatically identified by the meson so no need to setup environment variables (unless installing sleef at a custom place)
One other issue with meson I noticed previously is not having any architecture flags, which leads some of the object file to compiled as x86_64 build on arm-64 machine (fixed via setting up the flags)
if host_cpu == 'aarch64'
add_project_arguments('-arch', 'arm64', language: ['c', 'cpp'])
add_project_link_arguments('-arch', 'arm64', language: ['c', 'cpp'])I had an partially updated version of the meson file at this branch of my fork https://github.com/SwayamInSync/numpy-user-dtypes/blob/quaddtype-packaging/quaddtype/meson.build (supports windows builds + fix linking issues)
Edit: Just noticed this update in meson was sent along with this open PR #100