Remove default_shared_libs
system_shared_libs has been modified to have the same behavior as
the newly added default_shared_libs, remove default_shared_libs in
favor of system_shared_libs.
This reverts Ia2349d84c70e503916f90a5d2702e135248f73df and renames
the default_shared_libs property in cc_object (which never had
system_shared_libs) to system_shared_libs.
Bug: 193559105
Test: m checkbuild
Change-Id: I46672e3a096b6ea94ff4c10e1c31e8fd010a163c
diff --git a/cc/library.go b/cc/library.go
index 4fd7c74..684694b 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -147,12 +147,11 @@
Cflags []string `android:"arch_variant"`
- Enabled *bool `android:"arch_variant"`
- Whole_static_libs []string `android:"arch_variant"`
- Static_libs []string `android:"arch_variant"`
- Shared_libs []string `android:"arch_variant"`
- System_shared_libs []string `android:"arch_variant"`
- Default_shared_libs []string `android:"arch_variant"`
+ Enabled *bool `android:"arch_variant"`
+ Whole_static_libs []string `android:"arch_variant"`
+ Static_libs []string `android:"arch_variant"`
+ Shared_libs []string `android:"arch_variant"`
+ System_shared_libs []string `android:"arch_variant"`
Export_shared_lib_headers []string `android:"arch_variant"`
Export_static_lib_headers []string `android:"arch_variant"`
@@ -1157,17 +1156,11 @@
if library.StaticProperties.Static.System_shared_libs != nil {
library.baseLinker.Properties.System_shared_libs = library.StaticProperties.Static.System_shared_libs
}
- if library.StaticProperties.Static.Default_shared_libs != nil {
- library.baseLinker.Properties.Default_shared_libs = library.StaticProperties.Static.Default_shared_libs
- }
} else if library.shared() {
// Compare with nil because an empty list needs to be propagated.
if library.SharedProperties.Shared.System_shared_libs != nil {
library.baseLinker.Properties.System_shared_libs = library.SharedProperties.Shared.System_shared_libs
}
- if library.SharedProperties.Shared.Default_shared_libs != nil {
- library.baseLinker.Properties.Default_shared_libs = library.SharedProperties.Shared.Default_shared_libs
- }
}
deps = library.baseLinker.linkerDeps(ctx, deps)
@@ -1249,11 +1242,6 @@
} else {
specifiedDeps.systemSharedLibs = append(specifiedDeps.systemSharedLibs, properties.System_shared_libs...)
}
- if specifiedDeps.defaultSharedLibs == nil {
- specifiedDeps.defaultSharedLibs = properties.Default_shared_libs
- } else {
- specifiedDeps.defaultSharedLibs = append(specifiedDeps.defaultSharedLibs, properties.Default_shared_libs...)
- }
specifiedDeps.sharedLibs = android.FirstUniqueStrings(specifiedDeps.sharedLibs)
if len(specifiedDeps.systemSharedLibs) > 0 {
@@ -1261,11 +1249,6 @@
// retained.
specifiedDeps.systemSharedLibs = android.FirstUniqueStrings(specifiedDeps.systemSharedLibs)
}
- if len(specifiedDeps.defaultSharedLibs) > 0 {
- // Skip this if defaultSharedLibs is either nil or [], to ensure they are
- // retained.
- specifiedDeps.defaultSharedLibs = android.FirstUniqueStrings(specifiedDeps.defaultSharedLibs)
- }
return specifiedDeps
}