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

Commit 7d3f096c authored by Bill Peckham's avatar Bill Peckham Committed by Inseob Kim
Browse files

Include shared lib in vendor snapshot if isVndkExt

A VDNK extension is an image:vendor module provided by a
vendor-modified framework project. So it should be
provided to the vendor build as a prebuilt (for the
purposes of building against a vendor snapshot).

Exempt-From-Owner-Approval: cherry pick from internal branch

Bug: 160189878
Test: manual
Change-Id: I3eb4794c1be2949b9c85fd52f823e5e14df4ad7d
Merged-In: I3eb4794c1be2949b9c85fd52f823e5e14df4ad7d
parent 6bbe5774
Loading
Loading
Loading
Loading
+17 −2
Original line number Diff line number Diff line
@@ -569,7 +569,13 @@ func isVendorSnapshotModule(m *Module, moduleDir string) bool {
			return m.outputFile.Valid() && proptools.BoolDefault(m.VendorProperties.Vendor_available, true)
		}
		if l.shared() {
			return m.outputFile.Valid() && !m.IsVndk()
			if !m.outputFile.Valid() {
				return false
			}
			if !m.IsVndk() {
				return true
			}
			return m.isVndkExt()
		}
		return true
	}
@@ -669,7 +675,16 @@ func (c *vendorSnapshotSingleton) GenerateBuildActions(ctx android.SingletonCont

		// Common properties among snapshots.
		prop.ModuleName = ctx.ModuleName(m)
		if m.isVndkExt() {
			// vndk exts are installed to /vendor/lib(64)?/vndk(-sp)?
			if m.isVndkSp() {
				prop.RelativeInstallPath = "vndk-sp"
			} else {
				prop.RelativeInstallPath = "vndk"
			}
		} else {
			prop.RelativeInstallPath = m.RelativeInstallPath()
		}
		prop.RuntimeLibs = m.Properties.SnapshotRuntimeLibs
		prop.Required = m.RequiredModuleNames()
		for _, path := range m.InitRc() {