soong: Exclude system shared libs from fix suggestions
Pass the value of system_shared_libs to the Android.mk world, so that
prebuilt ELF check can exclude them from fix suggestions.
Bug: 141925662
Test: Write a bad cc_prebuilt_library module and check fix suggestions
Change-Id: I0cc61821765507180ce6a582bf8125a192f83a57
diff --git a/cc/androidmk.go b/cc/androidmk.go
index 380b4e9..fcaff55 100644
--- a/cc/androidmk.go
+++ b/cc/androidmk.go
@@ -83,6 +83,13 @@
if len(c.Properties.Logtags) > 0 {
entries.AddStrings("LOCAL_LOGTAGS_FILES", c.Properties.Logtags...)
}
+ // Note: Pass the exact value of AndroidMkSystemSharedLibs to the Make
+ // world, even if it is an empty list. In the Make world,
+ // LOCAL_SYSTEM_SHARED_LIBRARIES defaults to "none", which is expanded
+ // to the default list of system shared libs by the build system.
+ // Soong computes the exact list of system shared libs, so we have to
+ // override the default value when the list of libs is actually empty.
+ entries.SetString("LOCAL_SYSTEM_SHARED_LIBRARIES", strings.Join(c.Properties.AndroidMkSystemSharedLibs, " "))
if len(c.Properties.AndroidMkSharedLibs) > 0 {
entries.AddStrings("LOCAL_SHARED_LIBRARIES", c.Properties.AndroidMkSharedLibs...)
}