Add SourceProvider modules which provides a base interface for more
complex code generation usecases such as bindgen. Also adds the
rust_bindgen module type which calls bindgen to generate Rust FFI
bindings to C.
Bug: 159064919
Test: Local test module generates bindings.
Test: New Soong tests pass.
Change-Id: Ie31467bbbe423497666ad837cf5fe1acd1e76bd8
Depending on the location of the repository (e.g. external/, vendor/), a
different set of lints will be enabled. Add the clippy property to the
rust_* modules. This property can be used to overwrite the default
behaviour.
Test: m checkbuild
Bug: 157238651
Change-Id: Ife0f723ef4a74abb102597f8486a7b9f30e7d351
Because we are not relying on Cargo.toml for our crate dependencies,
we need to provide a structured file to rust-analyzer which describes
the locations of the crates. Add a generator for that purpose, similarly
to cc/compdb and cc/ccdeps.
Bug: 156395307
Test: SOONG_GEN_RUST_PROJECT=1 m nothing && \
cat ${ANDROID_BUILD_TOP}/out/soong/rust-project.json
Change-Id: I46efe0adeddae281eaf86707504c3aa15b5e80b8
Give prebuilt_etc and sh_binary their own packages and split the
gigantic main Android.bp up to small, per-package ones.
Test: m nothing, TreeHugger
Bug: 156980228
Change-Id: I7b00cd344b9f16861f1ff39edf0029f016b853d0