summaryrefslogtreecommitdiff
path: root/rust/testing.go
diff options
context:
space:
mode:
author Ivan Lozano <ivanlozano@google.com> 2021-05-20 13:39:16 -0400
committer Ivan Lozano <ivanlozano@google.com> 2021-06-03 08:32:05 -0400
commit1921e8003dd4e2a622e85ac1653f1fb3a683e569 (patch)
treeafbfd5fa933286ee533f90b44a644a40a33baed0 /rust/testing.go
parentd67a6b0a8824ec93f365b2a4777dd6773f6e352c (diff)
Rust cdylib/statliclib support for vendor snapshot.
Adds support for platform vendor_available Rust FFI libraries and binaries to be included in the vendor snapshot. Because rlib and dylibs are not yet in snapshots, libstd cannot be included in a vendor snapshot. As a result, vendor-specific Rust code can't be guaranteed to work with the platform-provided vendor_available modules built with a newer toolchain. For now, a check is added indicating vendor-specific Rust code is unsupported. This changes the linkage for vendor variants of these modules to default to rlib linkage since dylibs cannot be included in the snapshot yet. Bug: 184042776 Test: m nothing # new Soong tests pass Change-Id: I502eaa4bb962eb87ff868fcf49b435f0d2f982e6
Diffstat (limited to 'rust/testing.go')
-rw-r--r--rust/testing.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/rust/testing.go b/rust/testing.go
index a0f86b220..a7cbf54d8 100644
--- a/rust/testing.go
+++ b/rust/testing.go
@@ -45,6 +45,11 @@ var PrepareForIntegrationTestWithRust = android.GroupFixturePreparers(
PrepareForTestWithRustDefaultModules,
)
+var PrepareForTestWithRustIncludeVndk = android.GroupFixturePreparers(
+ PrepareForIntegrationTestWithRust,
+ cc.PrepareForTestWithCcIncludeVndk,
+)
+
func GatherRequiredDepsForTest() string {
bp := `
rust_prebuilt_library {