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
+31
Original file line number
Diff line number
Diff line change
@@ -574,6 +574,21 @@ where
574
574
.value_name("override")
575
575
.multiple_occurrences(true)
576
576
.number_of_values(1),
577
+
Arg::new("generate-extern-functions")
578
+
.long("generate-extern-functions")
579
+
.help("Generate extern wrappers for inlined functions"),
580
+
Arg::new("extern-functions-file-name")
581
+
.long("extern-functions-file-name")
582
+
.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.")
583
+
.takes_value(true),
584
+
Arg::new("extern-functions-directory")
585
+
.long("extern-functions-directory")
586
+
.help("Sets the directory path where any extra files must be created due to the presence of inlined functions.")
587
+
.takes_value(true),
588
+
Arg::new("extern-function-suffix")
589
+
.long("extern-function-suffix")
590
+
.help("Sets the suffix added to the extern wrapper functions generated for inlined functions.")
591
+
.takes_value(true),
577
592
Arg::new("V")
578
593
.long("version")
579
594
.help("Prints the version, and exits"),
@@ -1106,5 +1121,21 @@ where
1106
1121
}
1107
1122
}
1108
1123
1124
+
if matches.is_present("generate-extern-functions"){
0 commit comments