Skip to content
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 the ability to dump the complete preprocessed C/C++ bindgen takes as input to a file #811

Closed
fitzgen opened this issue Jul 13, 2017 · 1 comment

Comments

@fitzgen
Copy link
Member

fitzgen commented Jul 13, 2017

clang++ -save-temps doesn't seem to include any extra header files passed in as -include <header> which hurts debugging and reproducing issues in a standalone way. We use that to support multiple input header files. We should figure out how to work around this issue so we can accept multiple input headers and also get nice standalone debugging.

Perhaps create a synthetic in-memory file that has a #include <header> for every input header, and then we actually process that?

Not sure how to get libclang to dump a preprocessed file either.

@fitzgen
Copy link
Member Author

fitzgen commented Jul 13, 2017

This would help people who are filing issues with us file better issues, too.

fitzgen added a commit to fitzgen/rust-bindgen that referenced this issue Jul 13, 2017
This is useful when debugging bindgen, using C-Reduce on an input to bindgen, or
for constructing portable test cases when filing issues against bindgen.

Fixes rust-lang#811
bors-servo pushed a commit that referenced this issue Jul 14, 2017
Dump preprocessed input headers

See each commit message.

Fixes #811.

r? @emilio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant