Commit 70838a1
committed
v4l2-sys: Replace FreeBSD **host-only** include path override with docs
With `cfg!()` on `target_os` this include path is unconditionally used
if the _host_ OS is FreeBSD, even if the target OS is different (and its
cross-compilation headers are installed elsewhere on the system). The
accurate target OS, regardless of what the build script is _running on_
is stored in `CARGO_CFG_TARGET_OS`.
Since it is unlikely that the FreeBSD headers reside in `/usr/
local/include` when the *target* is FreeBSD while the host may be
something completely different, remove the workaround and document
how the user can set up arbitrary include directories for their target
using `BINDGEN_EXTRA_CLANG_ARGS` (or the triple-specific variant) by
documenting this environment variable in the main `README`. It is
common for developers to maintain such a configuration in their home
directory's `~/.cargo/ config.toml` for the various architectures that
they cross-compile to (together with related variables for the linker
and `cc-rs`).1 parent 677b02d commit 70838a1
2 files changed
Lines changed: 19 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | 7 | | |
20 | 8 | | |
21 | | - | |
22 | 9 | | |
23 | 10 | | |
24 | 11 | | |
| |||
0 commit comments