Skip to content

Commit

Permalink
Explain how to generate documentation for system headers
Browse files Browse the repository at this point in the history
  • Loading branch information
pvdrz committed Aug 30, 2024
1 parent 2fb25e3 commit d89ebe4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions book/src/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- [Does `bindgen` support the C++ Standard Template Library (STL)?](#does-bindgen-support-the-c-standard-template-library-stl)
- [How to deal with bindgen generated padding fields?](#how-to-deal-with-bindgen-generated-padding-fields)
- [How to generate bindings for a custom target?](#how-to-generate-bindings-for-a-custom-target)
- [Why isn't `bindgen` generating documentation for system headers?](#why-isnt-bindgen-generating-documentation-for-system-headers)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

Expand Down Expand Up @@ -115,3 +116,9 @@ $ bindgen <input_headers> -- --target=armv7a-none-eabi
```
If you are using `bindgen` as a library, you should call
`builder.clang_arg("--target=armv7a-none-eabi")` on your `builder`.

### Why isn't `bindgen` generating documentation for system headers?

By default, Bindgen does not generate documentation for system headers because
`libclang` does not provide this information. To address this, you should call
`builder.clang_arg("-fretain-comments-from-system-headers")` on your `builder`.

0 comments on commit d89ebe4

Please sign in to comment.