Merge changes from topic "vendor_ramdisk_soong"

* changes:
  Vendor ramdisk modules install to correct location
  Add vendor-ramdisk image to Soong.
This commit is contained in:
Yifan Hong
2020-10-24 01:08:16 +00:00
committed by Gerrit Code Review
21 changed files with 200 additions and 48 deletions

View File

@@ -1199,7 +1199,8 @@ func (library *libraryDecorator) link(ctx ModuleContext,
isVendor := ctx.useVndk()
isOwnerPlatform := Bool(library.Properties.Sysprop.Platform)
if !ctx.inRamdisk() && !ctx.inRecovery() && (isProduct || (isOwnerPlatform == isVendor)) {
if !ctx.inRamdisk() && !ctx.inVendorRamdisk() && !ctx.inRecovery() &&
(isProduct || (isOwnerPlatform == isVendor)) {
dir = android.PathForModuleGen(ctx, "sysprop/public", "include")
}
}
@@ -1291,7 +1292,7 @@ func (library *libraryDecorator) install(ctx ModuleContext, file android.Path) {
// runtime APEX.
translatedArch := ctx.Target().NativeBridge == android.NativeBridgeEnabled
if InstallToBootstrap(ctx.baseModuleName(), ctx.Config()) && !library.buildStubs() &&
!translatedArch && !ctx.inRamdisk() && !ctx.inRecovery() {
!translatedArch && !ctx.inRamdisk() && !ctx.inVendorRamdisk() && !ctx.inRecovery() {
if ctx.Device() {
library.installSymlinkToRuntimeApex(ctx, file)
}
@@ -1306,7 +1307,7 @@ func (library *libraryDecorator) install(ctx ModuleContext, file android.Path) {
}
if Bool(library.Properties.Static_ndk_lib) && library.static() &&
!ctx.useVndk() && !ctx.inRamdisk() && !ctx.inRecovery() && ctx.Device() &&
!ctx.useVndk() && !ctx.inRamdisk() && !ctx.inVendorRamdisk() && !ctx.inRecovery() && ctx.Device() &&
library.baseLinker.sanitize.isUnsanitizedVariant() &&
!library.buildStubs() && ctx.sdkVersion() == "" {
installPath := getNdkSysrootBase(ctx).Join(
@@ -1644,14 +1645,16 @@ func createPerApiVersionVariations(mctx android.BottomUpMutatorContext, minSdkVe
func CanBeOrLinkAgainstVersionVariants(module interface {
Host() bool
InRamdisk() bool
InVendorRamdisk() bool
InRecovery() bool
}) bool {
return !module.Host() && !module.InRamdisk() && !module.InRecovery()
return !module.Host() && !module.InRamdisk() && !module.InVendorRamdisk() && !module.InRecovery()
}
func CanBeVersionVariant(module interface {
Host() bool
InRamdisk() bool
InVendorRamdisk() bool
InRecovery() bool
CcLibraryInterface() bool
Shared() bool