summaryrefslogtreecommitdiff
path: root/rust/test.go
diff options
context:
space:
mode:
author Ivan Lozano <ivanlozano@google.com> 2021-07-15 15:44:10 -0400
committer Ivan Lozano <ivanlozano@google.com> 2021-07-15 15:45:31 -0400
commit3ee74c82526666849180d874051856ea84cde42d (patch)
tree7b39de09244c6f9f4f0babb2164728984ec03170 /rust/test.go
parent9e3e9c905bda7e997a6e7a82414dd1584b9fc57b (diff)
rust: Remove libtest from stdlibs list
libtest does not need to be linked for every module type, so remove it from the stdlibs list. Instead, link it only when building benchmarks or tests. Bug: 193782599 Test: cd external/rust/crates/; mma Test: Rust tests still run correctly. Change-Id: I536be8754da0987e09340744d9ebf668b8e734d0
Diffstat (limited to 'rust/test.go')
-rw-r--r--rust/test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/rust/test.go b/rust/test.go
index 6caa7b168..e95b47cff 100644
--- a/rust/test.go
+++ b/rust/test.go
@@ -169,3 +169,11 @@ func RustTestHostFactory() android.Module {
func (test *testDecorator) stdLinkage(ctx *depsContext) RustLinkage {
return RlibLinkage
}
+
+func (test *testDecorator) compilerDeps(ctx DepsContext, deps Deps) Deps {
+ deps = test.binaryDecorator.compilerDeps(ctx, deps)
+
+ deps.Rustlibs = append(deps.Rustlibs, "libtest")
+
+ return deps
+}