It's currently impossible to inject extra clang arguments when using bindgen, which is problematic when cross compiling since you may need critical arguments like `--target=...`. Because such arguments must be passed after the `--` it's impossible to inject them currently without going to something like a wrapper script. Fixes: #11805pull/11902/head
parent
43f24060f3
commit
c5b16ab8b9
6 changed files with 57 additions and 6 deletions
@ -0,0 +1,8 @@ |
||||
## A machine file may be used to pass extra arguments to clang in a bindgen call |
||||
|
||||
Because of the way that bindgen proxies arguments to clang the only choice to |
||||
add extra arguments currently is to wrap bindgen in a script, since the |
||||
arguments must come after a `--`. This is inelegant, and not very portable. Now |
||||
a `bindgen_clang_arguments` field may be placed in the machine file for the host |
||||
machine, and these arguments will be added to every bindgen call for clang. This |
||||
is intended to be useful for things like injecting `--target` arguments. |
Loading…
Reference in new issue