summaryrefslogtreecommitdiff
path: root/rust/benchmark.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/benchmark.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/benchmark.go')
-rw-r--r--rust/benchmark.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/rust/benchmark.go b/rust/benchmark.go
index b89f5cd9b..0e842435d 100644
--- a/rust/benchmark.go
+++ b/rust/benchmark.go
@@ -101,6 +101,7 @@ func (benchmark *benchmarkDecorator) compilerFlags(ctx ModuleContext, flags Flag
func (benchmark *benchmarkDecorator) compilerDeps(ctx DepsContext, deps Deps) Deps {
deps = benchmark.binaryDecorator.compilerDeps(ctx, deps)
+ deps.Rustlibs = append(deps.Rustlibs, "libtest")
deps.Rustlibs = append(deps.Rustlibs, "libcriterion")
return deps