Merge "Ignore some prebuilt vndk libs for trunk-stable next" into main
This commit is contained in:
@@ -80,6 +80,10 @@ func apexVndkMutator(mctx android.TopDownMutatorContext) {
|
|||||||
// config targets the 'current' VNDK (see `vndkVersion`).
|
// config targets the 'current' VNDK (see `vndkVersion`).
|
||||||
ab.Disable()
|
ab.Disable()
|
||||||
}
|
}
|
||||||
|
if proptools.String(ab.vndkProperties.Vndk_version) != "" &&
|
||||||
|
apiLevel.GreaterThanOrEqualTo(android.ApiLevelOrPanic(mctx, mctx.DeviceConfig().PlatformVndkVersion())) {
|
||||||
|
ab.Disable()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
14
cc/vndk.go
14
cc/vndk.go
@@ -361,11 +361,19 @@ func IsForVndkApex(mctx android.BottomUpMutatorContext, m *Module) bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
// prebuilt vndk modules should match with device
|
|
||||||
// TODO(b/142675459): Use enabled: to select target device in vndk_prebuilt_shared
|
// TODO(b/142675459): Use enabled: to select target device in vndk_prebuilt_shared
|
||||||
// When b/142675459 is landed, remove following check
|
// When b/142675459 is landed, remove following check
|
||||||
if p, ok := m.linker.(*vndkPrebuiltLibraryDecorator); ok && !p.MatchesWithDevice(mctx.DeviceConfig()) {
|
if p, ok := m.linker.(*vndkPrebuiltLibraryDecorator); ok {
|
||||||
return false
|
// prebuilt vndk modules should match with device
|
||||||
|
if !p.MatchesWithDevice(mctx.DeviceConfig()) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore prebuilt vndk modules that are newer than or equal to the platform vndk version
|
||||||
|
platformVndkApiLevel := android.ApiLevelOrPanic(mctx, mctx.DeviceConfig().PlatformVndkVersion())
|
||||||
|
if platformVndkApiLevel.LessThanOrEqualTo(android.ApiLevelOrPanic(mctx, p.Version())) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if lib, ok := m.linker.(libraryInterface); ok {
|
if lib, ok := m.linker.(libraryInterface); ok {
|
||||||
|
@@ -131,6 +131,12 @@ func (p *vndkPrebuiltLibraryDecorator) singleSourcePath(ctx ModuleContext) andro
|
|||||||
|
|
||||||
func (p *vndkPrebuiltLibraryDecorator) link(ctx ModuleContext,
|
func (p *vndkPrebuiltLibraryDecorator) link(ctx ModuleContext,
|
||||||
flags Flags, deps PathDeps, objs Objects) android.Path {
|
flags Flags, deps PathDeps, objs Objects) android.Path {
|
||||||
|
platformVndkApiLevel := android.ApiLevelOrPanic(ctx, ctx.DeviceConfig().PlatformVndkVersion())
|
||||||
|
if platformVndkApiLevel.LessThanOrEqualTo(android.ApiLevelOrPanic(ctx, p.Version())) {
|
||||||
|
// This prebuilt VNDK module is not required for the current build
|
||||||
|
ctx.Module().HideFromMake()
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
if !p.MatchesWithDevice(ctx.DeviceConfig()) {
|
if !p.MatchesWithDevice(ctx.DeviceConfig()) {
|
||||||
ctx.Module().HideFromMake()
|
ctx.Module().HideFromMake()
|
||||||
|
Reference in New Issue
Block a user