diff options
author | Travis Finkenauer <tmfinken@gmail.com> | 2020-06-04 23:50:01 -0400 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2020-06-05 13:38:28 +0200 |
commit | 117e2a1d5b12f63e0ade4b4acdad52fd7a1b5f7d (patch) | |
tree | 95a8d59df366526c843ed4fd7fe0a3aa5f05d201 | |
parent | b9ed1a1bba10d80647c9850d2d86d0dd1fca7993 (diff) |
Document BINDGEN_EXTRA_CLANG_ARGS env variable
Feature was originally introduced in pull-request #1537
-rw-r--r-- | src/lib.rs | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -191,6 +191,21 @@ impl Default for CodegenConfig { /// 4. Rustified enum /// /// If none of the above patterns match, then bindgen will generate a set of Rust constants. +/// +/// # Clang arguments +/// +/// Extra arguments can be passed to with clang: +/// 1. [`clang_arg()`](#method.clang_arg): takes a single argument +/// 2. [`clang_args()`](#method.clang_args): takes an iterator of arguments +/// 3. `BINDGEN_EXTRA_CLANG_ARGS` environment variable: whitespace separate +/// environment variable of arguments +/// +/// Clang arguments specific to your crate should be added via the +/// `clang_arg()`/`clang_args()` methods. +/// +/// End-users of the crate may need to set the `BINDGEN_EXTRA_CLANG_ARGS` environment variable to +/// add additional arguments. For example, to build against a different sysroot a user could set +/// `BINDGEN_EXTRA_CLANG_ARGS` to `--sysroot=/path/to/sysroot`. #[derive(Debug, Default)] pub struct Builder { options: BindgenOptions, |