You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If bindgen finds an inlined function and the
`--generate-extern-functions` options is enabled, then:
- It will generate two new source and header files with external
functions that wrap the inlined functions.
- Rerun `Bindings::generate` using the new header file to include these
wrappers in the generated bindings.
The following additional options were added:
- `--extern-function-suffix=<suffix>`: Adds <suffix> to the name of each
external wrapper function (`__extern` is used by default).
- `--extern-functions-file-name=<name>`: Uses <name> as the file name
for the header and source files (`extern` is used by default).
- `--extern-function-directory=<dir>`: Creates the source and header
files inside <dir> (`/tmp/bindgen` is used by default).
The C code serialization is experimental and only supports a very
limited set of C functions.
Fixes#1090.
Copy file name to clipboardExpand all lines: bindgen-cli/options.rs
+32
Original file line number
Diff line number
Diff line change
@@ -616,6 +616,22 @@ where
616
616
.long("wrap-unsafe-ops")
617
617
.help("Wrap unsafe operations in unsafe blocks.")
618
618
.action(ArgAction::SetTrue),
619
+
Arg::new("generate-extern-functions")
620
+
.long("generate-extern-functions")
621
+
.help("Generate extern wrappers for inlined functions")
622
+
.action(ArgAction::SetTrue),
623
+
Arg::new("extern-functions-file-name")
624
+
.long("extern-functions-file-name")
625
+
.help("Sets the name of the header and source code files that would be created if any extern wrapper functions must be generated due to the presence of inlined functions.")
626
+
.action(ArgAction::Set),
627
+
Arg::new("extern-functions-directory")
628
+
.long("extern-functions-directory")
629
+
.help("Sets the directory path where any extra files must be created due to the presence of inlined functions.")
630
+
.action(ArgAction::Set),
631
+
Arg::new("extern-function-suffix")
632
+
.long("extern-function-suffix")
633
+
.help("Sets the suffix added to the extern wrapper functions generated for inlined functions.")
0 commit comments