Skip to content

Commit d89ebe4

Browse files
committed
Explain how to generate documentation for system headers
1 parent 2fb25e3 commit d89ebe4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

book/src/faq.md

+7
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- [Does `bindgen` support the C++ Standard Template Library (STL)?](#does-bindgen-support-the-c-standard-template-library-stl)
99
- [How to deal with bindgen generated padding fields?](#how-to-deal-with-bindgen-generated-padding-fields)
1010
- [How to generate bindings for a custom target?](#how-to-generate-bindings-for-a-custom-target)
11+
- [Why isn't `bindgen` generating documentation for system headers?](#why-isnt-bindgen-generating-documentation-for-system-headers)
1112

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

@@ -115,3 +116,9 @@ $ bindgen <input_headers> -- --target=armv7a-none-eabi
115116
```
116117
If you are using `bindgen` as a library, you should call
117118
`builder.clang_arg("--target=armv7a-none-eabi")` on your `builder`.
119+
120+
### Why isn't `bindgen` generating documentation for system headers?
121+
122+
By default, Bindgen does not generate documentation for system headers because
123+
`libclang` does not provide this information. To address this, you should call
124+
`builder.clang_arg("-fretain-comments-from-system-headers")` on your `builder`.

0 commit comments

Comments
 (0)