Add SourceProviders and a rust_bindgen module type

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
This commit is contained in:
Ivan Lozano
2020-07-08 08:39:44 -04:00
parent 20efa41af8
commit 4fef93c53f
7 changed files with 341 additions and 3 deletions

View File

@@ -81,6 +81,7 @@ func CreateTestContext() *android.TestContext {
ctx.RegisterModuleType("genrule", genrule.GenRuleFactory)
ctx.RegisterModuleType("rust_binary", RustBinaryFactory)
ctx.RegisterModuleType("rust_binary_host", RustBinaryHostFactory)
ctx.RegisterModuleType("rust_bindgen", RustBindgenFactory)
ctx.RegisterModuleType("rust_test", RustTestFactory)
ctx.RegisterModuleType("rust_test_host", RustTestHostFactory)
ctx.RegisterModuleType("rust_library", RustLibraryFactory)