Add transitive shared libs to LOCAL_SHARED_LIBRARIES for rust modules
Rust modules are different from C++ modules in that they will install
their transitive shared libs alongside a binary. C++ modules don't
do this, you have to install the transitive shared lib manually. (but
they do install direct shared libs)
It does this by using InstallDepNeeded, a mechanism that adds
dependencies from installed files to the installed copies of
dependencies if InstallDepNeeded() returns true. This mechanism does
not end up tracking the installed files all the way to
FULL_SYSTEMIMAGE_DEPS.
We're attempting to make FULL_SYSTEMIMAGE_DEPS more accurate so that
we can track the files that should be installed properly, and remove
the need for `m installclean`.
Listing the libraries a binary uses in LOCAL_SHARED_LIBRARIES does
properly track them and end up listing them in FULL_SYSTEMIMAGE_DEPS.
Bug: 205632228
Test: Building the systemimage with a change to delete anything not in FULL_SYSTEMIMAGE_DEPS
Change-Id: I4ba75b40b3ac77250297209a851bc9ba377782f5
diff --git a/rust/binary_test.go b/rust/binary_test.go
index fc4c560..dff94ac 100644
--- a/rust/binary_test.go
+++ b/rust/binary_test.go
@@ -185,7 +185,7 @@
if !android.InList("libc", fizzMod.Properties.AndroidMkStaticLibs) {
t.Errorf("static binary not linking against libc as a static library")
}
- if len(fizzMod.Properties.AndroidMkSharedLibs) > 0 {
+ if len(fizzMod.transitiveAndroidMkSharedLibs.ToList()) > 0 {
t.Errorf("static binary incorrectly linking against shared libraries")
}
}