-
Notifications
You must be signed in to change notification settings - Fork 324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for outputting dependencies #192
Comments
This should be easyish to implement, I could even try to give it a shot. @luser do you know what's the standard way to do it?
Thanks :) |
I'm working on Rust support in meson, and native support for cbindgen is on my radar as something I'll need, and internal dependency tracking would be excellent. There is a pretty standard format used by both ninja and make (among others), which is essentially a makefile snippet in the form: output: depends1 depends 2 or, with linebreaks: output: depends1\
depends2 This format is supported by both gcc and clang (and, because bindgen is ultimately a wrapper around clang, you can get this information out of bindgen by passing arguments to clang), and can automatically be consumed by ninja and make. For me (and anyone else wanted to pass this information to make or ninja), having this dependency information writte to a file as a side effect of cbindgen is ideal, something in the form of: I'd be willing to work on this if you're not, but I'd appreciate some pointers on where to get started. |
It would be nice if cbindgen could provide the full list of input files it used to generate proper dependencies for build systems. @emilio is adding cbindgen to the Firefox build and his glue code is manually providing dependencies which makes me worry that that list could be incorrect, which would result in broken builds.
The text was updated successfully, but these errors were encountered: