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
This commit is contained in:
Colin Cross
2021-07-22 11:39:44 -07:00
parent 72bf8e1310
commit 6b8f4253eb
8 changed files with 37 additions and 232 deletions

View File

@@ -147,12 +147,11 @@ type StaticOrSharedProperties struct {
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 @@ func (library *libraryDecorator) linkerDeps(ctx DepsContext, deps Deps) Deps {
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 @@ func (library *libraryDecorator) linkerSpecifiedDeps(specifiedDeps specifiedDeps
} 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 @@ func (library *libraryDecorator) linkerSpecifiedDeps(specifiedDeps specifiedDeps
// 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
}