diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-11-06 01:01:06 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-11-06 01:01:06 +0000 |
commit | b8f463da5686188278b33fe6af19ba81f4820466 (patch) | |
tree | 8b5645f3c71955941e61b296702b2590434c60e4 | |
parent | d3c9f66a66f2d8c98d56ab76652e5444020806f3 (diff) | |
parent | b7de10739fca89220da03307a3228b32284bd65c (diff) |
Snap for 7889170 from b7de10739fca89220da03307a3228b32284bd65c to sc-v2-release
Change-Id: Ia309c20b2ba86e77a60dcbf4a19aab3c8ca440ee
-rw-r--r-- | rust/benchmark.go | 1 | ||||
-rw-r--r-- | rust/config/global.go | 1 | ||||
-rw-r--r-- | rust/test.go | 8 | ||||
-rw-r--r-- | rust/testing.go | 2 |
4 files changed, 9 insertions, 3 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 diff --git a/rust/config/global.go b/rust/config/global.go index 43b49d18b..1b56237b3 100644 --- a/rust/config/global.go +++ b/rust/config/global.go @@ -29,7 +29,6 @@ var ( DefaultEdition = "2018" Stdlibs = []string{ "libstd", - "libtest", } // Mapping between Soong internal arch types and std::env constants. 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 +} diff --git a/rust/testing.go b/rust/testing.go index a0f86b220..1e0c5abbb 100644 --- a/rust/testing.go +++ b/rust/testing.go @@ -162,12 +162,10 @@ func GatherRequiredDepsForTest() string { name: "libtest", crate_name: "test", srcs: ["foo.rs"], - no_stdlibs: true, host_supported: true, vendor_available: true, vendor_ramdisk_available: true, native_coverage: false, - sysroot: true, apex_available: ["//apex_available:platform", "//apex_available:anyapex"], min_sdk_version: "29", } |