Fix panics when target arch is riscv64

Fix panics in api_level.go and apex.go when using riscv64 as the target
arch.

Bug: 250918230
Test: lunch aosp_riscv64-userdebug && m ALLOW_MISSING_DEPENDENCIES=true nothing
Change-Id: I85c7685f3d14fa2dc7ffbcdea7f490feca304ef7
This commit is contained in:
Colin Cross
2022-10-03 12:41:50 -07:00
parent b9238c0b72
commit a2aaa2fdef
4 changed files with 13 additions and 5 deletions

View File

@@ -286,6 +286,9 @@ type apexArchBundleProperties struct {
Arm64 struct {
ApexNativeDependencies
}
Riscv64 struct {
ApexNativeDependencies
}
X86 struct {
ApexNativeDependencies
}
@@ -787,6 +790,8 @@ func (a *apexBundle) DepsMutator(ctx android.BottomUpMutatorContext) {
depsList = append(depsList, a.archProperties.Arch.Arm.ApexNativeDependencies)
case android.Arm64:
depsList = append(depsList, a.archProperties.Arch.Arm64.ApexNativeDependencies)
case android.Riscv64:
depsList = append(depsList, a.archProperties.Arch.Riscv64.ApexNativeDependencies)
case android.X86:
depsList = append(depsList, a.archProperties.Arch.X86.ApexNativeDependencies)
case android.X86_64: