diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2023-06-21 12:15:07 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2023-06-27 11:53:18 -0700 |
commit | c5b16ab8b957d53b75c73bb24144a4f61c86234d (patch) | |
tree | d4ada77ecd56f09ea3996a39a60cae4dd6b156f4 /docs/markdown/snippets | |
parent | 43f24060f3e0065b44b1909d88bcc8e2882e9e5e (diff) | |
download | meson-c5b16ab8b957d53b75c73bb24144a4f61c86234d.zip meson-c5b16ab8b957d53b75c73bb24144a4f61c86234d.tar.gz meson-c5b16ab8b957d53b75c73bb24144a4f61c86234d.tar.bz2 |
modules/rust: Add a machine file property for extra clang args with bindgen
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: #11805
Diffstat (limited to 'docs/markdown/snippets')
-rw-r--r-- | docs/markdown/snippets/rust_extra_clang_bindgen_arguments.md | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/markdown/snippets/rust_extra_clang_bindgen_arguments.md b/docs/markdown/snippets/rust_extra_clang_bindgen_arguments.md new file mode 100644 index 0000000..71268d4 --- /dev/null +++ b/docs/markdown/snippets/rust_extra_clang_bindgen_arguments.md @@ -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. |