Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 61eb8aae authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge changes from topic "fix-vndk-core-variant"

* changes:
  Do not install VNDK lib in favor of VNDK APEX
  Fix apex_vndk with TARGET_VNDK_USE_CORE_VARIANT
  Do not follow deps for apex_vndk
parents 4bce23b1 b01c114d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1176,7 +1176,7 @@ func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) {
					ctx.PropertyErrorf("apps", "%q is not an android_app module", depName)
				}
			}
		} else {
		} else if !a.vndkApex {
			// indirect dependencies
			if am, ok := child.(android.ApexModule); ok {
				// We cannot use a switch statement on `depTag` here as the checked
+5 −0
Original line number Diff line number Diff line
@@ -93,6 +93,11 @@ func (c *Module) AndroidMk() android.AndroidMkData {
					fmt.Fprintln(w, "LOCAL_USE_VNDK := true")
					if c.IsVndk() && !c.static() {
						fmt.Fprintln(w, "LOCAL_SOONG_VNDK_VERSION := "+c.vndkVersion())
						// VNDK libraries available to vendor are not installed because
						// they are packaged in VNDK APEX and installed by APEX packages (apex/apex.go)
						if !c.isVndkExt() {
							fmt.Fprintln(w, "LOCAL_UNINSTALLABLE_MODULE := true")
						}
					}
				}
			},
+5 −2
Original line number Diff line number Diff line
@@ -337,6 +337,10 @@ func IsForVndkApex(mctx android.BottomUpMutatorContext, m *Module) bool {
		return false
	}

	if !mctx.Device() {
		return false
	}

	if m.Target().NativeBridge == android.NativeBridgeEnabled {
		return false
	}
@@ -350,8 +354,7 @@ func IsForVndkApex(mctx android.BottomUpMutatorContext, m *Module) bool {

	if lib, ok := m.linker.(libraryInterface); ok {
		useCoreVariant := m.vndkVersion() == mctx.DeviceConfig().PlatformVndkVersion() &&
			mctx.DeviceConfig().VndkUseCoreVariant() &&
			!inList(m.BaseModuleName(), config.VndkMustUseVendorVariantList)
			mctx.DeviceConfig().VndkUseCoreVariant() && !m.MustUseVendorVariant()
		return lib.shared() && m.UseVndk() && m.IsVndk() && !m.isVndkExt() && !useCoreVariant
	}
	return false