Detect C vendor as compiler does
In passing, the OCaml compiler has it's own rules for detecting the vendor, and its own identifier for each vendor. Perhaps Dune should align itself on these?
https://github.com/ocaml/ocaml/blob/ddb608abde9cd4787a24c825e07352dfa73fd717/aclocal.m4#L39-L86
They are loosely inspired from the AX_COMPILER_VENDOR macro from the Autoconf archive, which is not super up-to-date with respect to existing C compilers.
Originally posted by @MisterDA in https://github.com/ocaml/dune/issues/14799#issuecomment-4600904826
@Alizter I can take a look at this as I have an experience with c-bindings like on this OSS project I made PolyglotFFI which automatically generates complete Foreign Function Interface (FFI) bindings between programming languages. Write your OCaml interface once, and get type-safe, memory-safe bindings for Python.