Merge "Do not hide VNDK prebuilts from make" am: 07f37120e5
Change-Id: I35cbeaeaa2bdd910cd6578f54dd075a4baa81c0d
This commit is contained in:
@@ -413,12 +413,9 @@ func (c *llndkStubDecorator) AndroidMk(ctx AndroidMkContext, ret *android.Androi
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *vndkPrebuiltLibraryDecorator) AndroidMk(ctx AndroidMkContext, ret *android.AndroidMkData) {
|
func (c *vndkPrebuiltLibraryDecorator) AndroidMk(ctx AndroidMkContext, ret *android.AndroidMkData) {
|
||||||
// Each vndk prebuilt is exported to androidMk only when BOARD_VNDK_VERSION != current
|
|
||||||
// and the version of the prebuilt is same as BOARD_VNDK_VERSION.
|
|
||||||
ret.Class = "SHARED_LIBRARIES"
|
ret.Class = "SHARED_LIBRARIES"
|
||||||
|
|
||||||
// shouldn't add any suffixes due to mk modules
|
ret.SubName = c.androidMkSuffix
|
||||||
ret.SubName = ""
|
|
||||||
|
|
||||||
ret.Extra = append(ret.Extra, func(w io.Writer, outputFile android.Path) {
|
ret.Extra = append(ret.Extra, func(w io.Writer, outputFile android.Path) {
|
||||||
c.libraryDecorator.androidMkWriteExportedFlags(w)
|
c.libraryDecorator.androidMkWriteExportedFlags(w)
|
||||||
|
@@ -72,7 +72,8 @@ type vndkPrebuiltProperties struct {
|
|||||||
|
|
||||||
type vndkPrebuiltLibraryDecorator struct {
|
type vndkPrebuiltLibraryDecorator struct {
|
||||||
*libraryDecorator
|
*libraryDecorator
|
||||||
properties vndkPrebuiltProperties
|
properties vndkPrebuiltProperties
|
||||||
|
androidMkSuffix string
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *vndkPrebuiltLibraryDecorator) Name(name string) string {
|
func (p *vndkPrebuiltLibraryDecorator) Name(name string) string {
|
||||||
@@ -153,6 +154,13 @@ func (p *vndkPrebuiltLibraryDecorator) link(ctx ModuleContext,
|
|||||||
p.tocFile = android.OptionalPathForPath(tocFile)
|
p.tocFile = android.OptionalPathForPath(tocFile)
|
||||||
TransformSharedObjectToToc(ctx, in, tocFile, builderFlags)
|
TransformSharedObjectToToc(ctx, in, tocFile, builderFlags)
|
||||||
|
|
||||||
|
p.androidMkSuffix = p.NameSuffix()
|
||||||
|
|
||||||
|
vndkVersion := ctx.DeviceConfig().VndkVersion()
|
||||||
|
if vndkVersion == p.version() {
|
||||||
|
p.androidMkSuffix = ""
|
||||||
|
}
|
||||||
|
|
||||||
return in
|
return in
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -224,15 +232,6 @@ func vndkPrebuiltSharedLibrary() *Module {
|
|||||||
&prebuilt.properties,
|
&prebuilt.properties,
|
||||||
)
|
)
|
||||||
|
|
||||||
android.AddLoadHook(module, func(ctx android.LoadHookContext) {
|
|
||||||
// Only vndk snapshots of BOARD_VNDK_VERSION will be used when building.
|
|
||||||
if prebuilt.version() != ctx.DeviceConfig().VndkVersion() {
|
|
||||||
module.SkipInstall()
|
|
||||||
module.Properties.HideFromMake = true
|
|
||||||
return
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
return module
|
return module
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user