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:
14
cc/object.go
14
cc/object.go
@@ -78,7 +78,7 @@ type ObjectLinkerProperties struct {
|
||||
|
||||
// list of default libraries that will provide headers for this module. If unset, generally
|
||||
// defaults to libc, libm, and libdl. Set to [] to prevent using headers from the defaults.
|
||||
Default_shared_libs []string `android:"arch_variant"`
|
||||
System_shared_libs []string `android:"arch_variant"`
|
||||
|
||||
// names of other cc_object modules to link into this module using partial linking
|
||||
Objs []string `android:"arch_variant"`
|
||||
@@ -212,9 +212,9 @@ func (object *objectLinker) linkerDeps(ctx DepsContext, deps Deps) Deps {
|
||||
deps.StaticLibs = append(deps.StaticLibs, object.Properties.Static_libs...)
|
||||
deps.ObjFiles = append(deps.ObjFiles, object.Properties.Objs...)
|
||||
|
||||
deps.SystemSharedLibs = object.Properties.Default_shared_libs
|
||||
deps.SystemSharedLibs = object.Properties.System_shared_libs
|
||||
if deps.SystemSharedLibs == nil {
|
||||
// Provide a default set of shared libraries if default_shared_libs is unspecified.
|
||||
// Provide a default set of shared libraries if system_shared_libs is unspecified.
|
||||
// Note: If an empty list [] is specified, it implies that the module declines the
|
||||
// default shared libraries.
|
||||
deps.SystemSharedLibs = append(deps.SystemSharedLibs, ctx.toolchain().DefaultSharedLibraries()...)
|
||||
@@ -271,12 +271,12 @@ func (object *objectLinker) link(ctx ModuleContext,
|
||||
func (object *objectLinker) linkerSpecifiedDeps(specifiedDeps specifiedDeps) specifiedDeps {
|
||||
specifiedDeps.sharedLibs = append(specifiedDeps.sharedLibs, object.Properties.Shared_libs...)
|
||||
|
||||
// Must distinguish nil and [] in default_shared_libs - ensure that [] in
|
||||
// Must distinguish nil and [] in system_shared_libs - ensure that [] in
|
||||
// either input list doesn't come out as nil.
|
||||
if specifiedDeps.defaultSharedLibs == nil {
|
||||
specifiedDeps.defaultSharedLibs = object.Properties.Default_shared_libs
|
||||
if specifiedDeps.systemSharedLibs == nil {
|
||||
specifiedDeps.systemSharedLibs = object.Properties.System_shared_libs
|
||||
} else {
|
||||
specifiedDeps.defaultSharedLibs = append(specifiedDeps.defaultSharedLibs, object.Properties.Default_shared_libs...)
|
||||
specifiedDeps.systemSharedLibs = append(specifiedDeps.systemSharedLibs, object.Properties.System_shared_libs...)
|
||||
}
|
||||
|
||||
return specifiedDeps
|
||||
|
Reference in New Issue
Block a user