Merge "Do not install LLNDK libs moved APEX on /system"
This commit is contained in:
@@ -959,7 +959,11 @@ func (library *libraryDecorator) install(ctx ModuleContext, file android.Path) {
|
|||||||
}
|
}
|
||||||
library.baseInstaller.subDir = "bootstrap"
|
library.baseInstaller.subDir = "bootstrap"
|
||||||
}
|
}
|
||||||
|
} else if android.DirectlyInAnyApex(ctx, ctx.ModuleName()) && ctx.isLlndk(ctx.Config()) && !isBionic(ctx.baseModuleName()) {
|
||||||
|
// Skip installing LLNDK (non-bionic) libraries moved to APEX.
|
||||||
|
ctx.Module().SkipInstall()
|
||||||
}
|
}
|
||||||
|
|
||||||
library.baseInstaller.install(ctx, file)
|
library.baseInstaller.install(ctx, file)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -63,6 +63,13 @@ func makeStringOfWarningAllowedProjects() string {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type notOnHostContext struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *notOnHostContext) Host() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
func makeVarsProvider(ctx android.MakeVarsContext) {
|
func makeVarsProvider(ctx android.MakeVarsContext) {
|
||||||
vendorPublicLibraries := vendorPublicLibraries(ctx.Config())
|
vendorPublicLibraries := vendorPublicLibraries(ctx.Config())
|
||||||
|
|
||||||
@@ -102,13 +109,23 @@ func makeVarsProvider(ctx android.MakeVarsContext) {
|
|||||||
// Therefore, by removing the library here, we cause it to only be installed if libc
|
// Therefore, by removing the library here, we cause it to only be installed if libc
|
||||||
// depends on it.
|
// depends on it.
|
||||||
installedLlndkLibraries := []string{}
|
installedLlndkLibraries := []string{}
|
||||||
|
|
||||||
|
// Make uses LLNDK_MOVED_TO_APEX_LIBRARIES to avoid installing libraries on /system if
|
||||||
|
// they been moved to an apex.
|
||||||
|
movedToApexLlndkLibraries := []string{}
|
||||||
for _, lib := range *llndkLibraries(ctx.Config()) {
|
for _, lib := range *llndkLibraries(ctx.Config()) {
|
||||||
if strings.HasPrefix(lib, "libclang_rt.hwasan-") {
|
if strings.HasPrefix(lib, "libclang_rt.hwasan-") {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
installedLlndkLibraries = append(installedLlndkLibraries, lib)
|
installedLlndkLibraries = append(installedLlndkLibraries, lib)
|
||||||
|
|
||||||
|
// Skip bionic libs, they are handled in different manner
|
||||||
|
if android.DirectlyInAnyApex(¬OnHostContext{}, lib) && !isBionic(lib) {
|
||||||
|
movedToApexLlndkLibraries = append(movedToApexLlndkLibraries, lib)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ctx.Strict("LLNDK_LIBRARIES", strings.Join(installedLlndkLibraries, " "))
|
ctx.Strict("LLNDK_LIBRARIES", strings.Join(installedLlndkLibraries, " "))
|
||||||
|
ctx.Strict("LLNDK_MOVED_TO_APEX_LIBRARIES", strings.Join(movedToApexLlndkLibraries, " "))
|
||||||
|
|
||||||
ctx.Strict("VNDK_PRIVATE_LIBRARIES", strings.Join(*vndkPrivateLibraries(ctx.Config()), " "))
|
ctx.Strict("VNDK_PRIVATE_LIBRARIES", strings.Join(*vndkPrivateLibraries(ctx.Config()), " "))
|
||||||
ctx.Strict("VNDK_USING_CORE_VARIANT_LIBRARIES", strings.Join(*vndkUsingCoreVariantLibraries(ctx.Config()), " "))
|
ctx.Strict("VNDK_USING_CORE_VARIANT_LIBRARIES", strings.Join(*vndkUsingCoreVariantLibraries(ctx.Config()), " "))
|
||||||
|
Reference in New Issue
Block a user