You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using bindgen for non-system libraries, it's common pattern to also have cc-rs for compilation that gets most flags (include headers, paths, ...) duplicated for bindgen (see mozjs or mozangle for such examples). This is usually migrated by feeding same raw compiler flags for both. It would be nice to only provide all flags once using nicer cc api and then reuse them for bindgen. Or simply offer compilation as part of bindgen (maybe benefiting because static analysis is not run twice).
The text was updated successfully, but these errors were encountered:
In principle, it would be good enough if cc could provide the flags passed to the C compiler somehow as then you could feed them as clang_args to bindgen.
Whether or not it is possible to turn bindgen into a proper compiler depends on whether or not libclang is able to take a translation unit and turn it into an actual binary somehow, but afaik libclang does not provide such functionality.
When using bindgen for non-system libraries, it's common pattern to also have cc-rs for compilation that gets most flags (include headers, paths, ...) duplicated for bindgen (see mozjs or mozangle for such examples). This is usually migrated by feeding same raw compiler flags for both. It would be nice to only provide all flags once using nicer cc api and then reuse them for bindgen. Or simply offer compilation as part of bindgen (maybe benefiting because static analysis is not run twice).
The text was updated successfully, but these errors were encountered: