Merge "Assert that platform_sdk_codename is set" am: 7a64621169
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2505641 Change-Id: I512e9b14b265ab11199fb016dfc01dc57c402b7c Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -913,8 +913,16 @@ func (c *config) DefaultAppTargetSdk(ctx EarlyModuleContext) ApiLevel {
|
|||||||
return c.PlatformSdkVersion()
|
return c.PlatformSdkVersion()
|
||||||
}
|
}
|
||||||
codename := c.PlatformSdkCodename()
|
codename := c.PlatformSdkCodename()
|
||||||
|
hostOnlyBuild := c.productVariables.DeviceArch == nil
|
||||||
if codename == "" {
|
if codename == "" {
|
||||||
return NoneApiLevel
|
// There are some host-only builds (those are invoked by build-prebuilts.sh) which
|
||||||
|
// don't set platform sdk codename. Platform sdk codename makes sense only when we
|
||||||
|
// are building the platform. So we don't enforce the below panic for the host-only
|
||||||
|
// builds.
|
||||||
|
if hostOnlyBuild {
|
||||||
|
return NoneApiLevel
|
||||||
|
}
|
||||||
|
panic("Platform_sdk_codename must be set")
|
||||||
}
|
}
|
||||||
if codename == "REL" {
|
if codename == "REL" {
|
||||||
panic("Platform_sdk_codename should not be REL when Platform_sdk_final is true")
|
panic("Platform_sdk_codename should not be REL when Platform_sdk_final is true")
|
||||||
|
Reference in New Issue
Block a user