Merge "Move checking of minApiForArch for apex into cc"
This commit is contained in:
10
cc/cc.go
10
cc/cc.go
@@ -3626,6 +3626,16 @@ func (c *Module) ShouldSupportSdkVersion(ctx android.BaseModuleContext,
|
||||
return err
|
||||
}
|
||||
|
||||
// A dependency only needs to support a min_sdk_version at least
|
||||
// as high as the api level that the architecture was introduced in.
|
||||
// This allows introducing new architectures in the platform that
|
||||
// need to be included in apexes that normally require an older
|
||||
// min_sdk_version.
|
||||
minApiForArch := minApiForArch(ctx, c.Target().Arch.ArchType)
|
||||
if sdkVersion.LessThan(minApiForArch) {
|
||||
sdkVersion = minApiForArch
|
||||
}
|
||||
|
||||
if ver.GreaterThan(sdkVersion) {
|
||||
return fmt.Errorf("newer SDK(%v)", ver)
|
||||
}
|
||||
|
Reference in New Issue
Block a user