-
Notifications
You must be signed in to change notification settings - Fork 77
Description
Some compiler flags can affect the bindings or the binary in significant for us ways. At the very least, we should be able to find the preprocessor flags (-D
) and pass to bindgen. That requires improving our Makefile parser and collecting more variables.
A practical example: I've been trying to enforce the alignment requirements by statically asserting that the NGX_ALIGNMENT
the nginx binary was built with is large enough (improperly aligned pointers are UB in Rust, and some of the core::
APIs verify alignment), and found that it wasn't possible to detect that the alignment was overridden via auto/configure --with-cc-opt="-DNGX_ALIGNMENT=8"
.
Metadata
Metadata
Assignees
Labels
No labels