rust: Only allow bindgen to produce `rlib`s.
Generated bindings are intended to be slim translation layers, usually consisting of nothing more than type signatures and constants. Generally, they should also be used in exactly one location by the safe wrapper for these bindings. By preventing them from building as `dylib`s, we avoid the per-library overhead of these non-reused pieces of code. Additionally, default visibility restrict all bindgen modules to their subpackages. This is being done both: * to encourage use of a single safe bindings crate * to avoid diamond dependency graphs with mixed rlib/dylib dependencies Bug: 166332519 Test: m; Make sample module use dylib bindgen dependency, see build failure. Change-Id: I8e9d9cb851c2ec99f4ed63e6e18c4ba26b29721c
Loading
Please register or sign in to comment