vezel-dev / libffi

A friendly libffi fork with a Zig build script and bindings.
Other
4 stars 0 forks source link

Consider making some libffi build options configurable #2

Open alexrp opened 2 months ago

alexrp commented 2 months ago

https://github.com/vezel-dev/libffi/blob/83a25935fc8ea5a5d1769d5b5a3522947d16f32c/build.zig#L293 https://github.com/vezel-dev/libffi/blob/83a25935fc8ea5a5d1769d5b5a3522947d16f32c/build.zig#L299 https://github.com/vezel-dev/libffi/blob/83a25935fc8ea5a5d1769d5b5a3522947d16f32c/build.zig#L304 https://github.com/vezel-dev/libffi/blob/83a25935fc8ea5a5d1769d5b5a3522947d16f32c/build.zig#L305

alexrp commented 1 month ago

FFI_DEBUG

This seems to mostly be for internal libffi debugging purposes, so not that useful.

FFI_NO_RAW_API

I decided not to bind the raw API as it's undocumented and (AFAICT) never really used in the wild. So this option doesn't matter.

FFI_NO_STRUCTS

No idea why anyone would want this. It doesn't even significantly reduce code size.

alexrp commented 1 month ago

FFI_MMAP_EXEC_EMUTRAMP_PAX

This seems useful for Gentoo/PaX. Should be added, but off by default.