diff options
Diffstat (limited to 'cc/library_sdk_member.go')
-rw-r--r-- | cc/library_sdk_member.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cc/library_sdk_member.go b/cc/library_sdk_member.go index 49674552f..0a11af126 100644 --- a/cc/library_sdk_member.go +++ b/cc/library_sdk_member.go @@ -212,7 +212,9 @@ func addPossiblyArchSpecificProperties(sdkModuleContext android.ModuleContext, b outputProperties.AddPropertyWithTag("shared_libs", libInfo.SharedLibs, builder.SdkMemberReferencePropertyTag(false)) } - if len(libInfo.SystemSharedLibs) > 0 { + // SystemSharedLibs needs to be propagated if it's a list, even if it's empty, + // so check for non-nil instead of nonzero length. + if libInfo.SystemSharedLibs != nil { outputProperties.AddPropertyWithTag("system_shared_libs", libInfo.SystemSharedLibs, builder.SdkMemberReferencePropertyTag(false)) } @@ -327,7 +329,8 @@ type nativeLibInfoProperties struct { // This field is exported as its contents may not be arch specific. SharedLibs []string - // The set of system shared libraries + // The set of system shared libraries. Note nil and [] are semantically + // distinct - see BaseLinkerProperties.System_shared_libs. // // This field is exported as its contents may not be arch specific. SystemSharedLibs []string |