From bbd25aeb428edaa7fb332cc0a6771aeede38e286 Mon Sep 17 00:00:00 2001 From: Chih-Hung Hsieh Date: Fri, 15 May 2020 17:36:30 -0700 Subject: Specify module dependency in the srcs list * "srcs" list contains one main Rust source file, followed by optional dependent modules. * A dependent module included in the "srcs" list is the module name prefixed with ":". * Add a simple test. Bug: 160331255 Test: make and manual test build dependencies on genrule modules Change-Id: I4f079138c2599158810b6412fce81b612a3f64a4 --- rust/testing.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'rust/testing.go') diff --git a/rust/testing.go b/rust/testing.go index 3d583e197..430b40bfd 100644 --- a/rust/testing.go +++ b/rust/testing.go @@ -17,6 +17,7 @@ package rust import ( "android/soong/android" "android/soong/cc" + "android/soong/genrule" ) func GatherRequiredDepsForTest() string { @@ -77,6 +78,7 @@ func GatherRequiredDepsForTest() string { func CreateTestContext() *android.TestContext { ctx := android.NewTestArchContext() cc.RegisterRequiredBuildComponentsForTest(ctx) + ctx.RegisterModuleType("genrule", genrule.GenRuleFactory) ctx.RegisterModuleType("rust_binary", RustBinaryFactory) ctx.RegisterModuleType("rust_binary_host", RustBinaryHostFactory) ctx.RegisterModuleType("rust_test", RustTestFactory) -- cgit v1.2.3-59-g8ed1b