Files
build_soong/rust
Ellen Arteca 810c37ec1e Adds support to bindgen to handle static inline fcts
Adds support for bindgen to be able to handle `static inline`
functions. This is done by adding a new boolean field to the `BindgenProperties`
struct, `Handle_static_inline` (default to false).
If this field is true, then the flags to trigger bindgen support of
static inline functions are passed in.

The rust-bindgen documentation list two ways of handling `static inline`
functions, both specified with command line args.
1) --generate-inline-functions
2) --experimental --wrap-static-fns

Option 1 requires some extra effort on the part of the C library developer, in
that they have to expose the function symbols: the docs (linked below) explain
that this is often done by compiling the library with inlining disabled, which
can be detrimental to performance.

Option 2 requires no effort on the part of the C library developer, but it does
require the `--experimental` flag, since this feature is still under development.

This CL goes with option 2.

Relevant docs: https://github.com/rust-lang/rust-bindgen/discussions/2405

This CL also adds a new test: TestBindgenHandleStaticInlining in bindgen_test.go

Test: m blueprint_tests
Change-Id: If28000e3f3ccecc65c4cae1c62d7bf455454239a
2024-04-23 00:48:25 +00:00
..
2024-04-09 19:39:01 +00:00
2024-04-05 01:56:56 +00:00
2020-08-13 15:58:09 +02:00
2023-05-19 20:31:32 +00:00
2024-04-05 01:56:56 +00:00
2022-07-28 06:57:26 -07:00
2023-12-21 17:53:51 +00:00
2024-04-05 01:56:56 +00:00
2020-11-19 20:02:34 +01:00
2023-11-17 21:28:39 +00:00
2024-01-09 11:37:14 +09:00
2024-04-05 01:56:56 +00:00