aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/snippets
diff options
context:
space:
mode:
Diffstat (limited to 'docs/markdown/snippets')
-rw-r--r--docs/markdown/snippets/rust_extra_clang_bindgen_arguments.md8
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.