third_party_rust_bindgen/bindgen/ir
Christian Poveda Ruiz 2be14a3345
Generate extern wrappers for inlined functions (#2335)
* Generate extern wrappers for inlined functions

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.

---------

Co-authored-by: Amanjeev Sethi <aj@amanjeev.com>
2023-02-07 10:13:48 -05:00
..
analysis Fix clippy warnings (#2362) 2022-11-24 10:50:15 -05:00
annotations.rs split the repo into a workspace 2022-10-04 20:47:17 -05:00
comment.rs Add ParseCallbacks::process_comment (#2347) 2022-11-22 11:25:13 -05:00
comp.rs Remove traits that have a single implementation (#2363) 2022-11-24 11:17:08 -05:00
context.rs Generate extern wrappers for inlined functions (#2335) 2023-02-07 10:13:48 -05:00
derive.rs split the repo into a workspace 2022-10-04 20:47:17 -05:00
dot.rs split the repo into a workspace 2022-10-04 20:47:17 -05:00
enum_ty.rs Remove traits that have a single implementation (#2363) 2022-11-24 11:17:08 -05:00
function.rs Generate extern wrappers for inlined functions (#2335) 2023-02-07 10:13:48 -05:00
int.rs split the repo into a workspace 2022-10-04 20:47:17 -05:00
item_kind.rs split the repo into a workspace 2022-10-04 20:47:17 -05:00
item.rs Remove traits that have a single implementation (#2363) 2022-11-24 11:17:08 -05:00
layout.rs split the repo into a workspace 2022-10-04 20:47:17 -05:00
mod.rs split the repo into a workspace 2022-10-04 20:47:17 -05:00
module.rs split the repo into a workspace 2022-10-04 20:47:17 -05:00
objc.rs Remove traits that have a single implementation (#2363) 2022-11-24 11:17:08 -05:00
template.rs Remove traits that have a single implementation (#2363) 2022-11-24 11:17:08 -05:00
traversal.rs split the repo into a workspace 2022-10-04 20:47:17 -05:00
ty.rs Fix name collision between C enum and typedef (#2326) 2022-11-28 09:40:20 -05:00
var.rs Extend generated_name_override callback to variables (#2351) 2022-11-28 13:16:10 -05:00