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:
@@ -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:
|
||||
|
@@ -28,6 +28,8 @@ func minApiForArch(ctx android.BaseModuleContext,
|
||||
return ctx.Config().MinSupportedSdkVersion()
|
||||
case android.Arm64, android.X86_64:
|
||||
return android.FirstLp64Version
|
||||
case android.Riscv64:
|
||||
return android.FutureApiLevel
|
||||
default:
|
||||
panic(fmt.Errorf("Unknown arch %q", arch))
|
||||
}
|
||||
|
@@ -90,10 +90,11 @@ func (as *AndroidAppSet) APKCertsFile() android.Path {
|
||||
}
|
||||
|
||||
var TargetCpuAbi = map[string]string{
|
||||
"arm": "ARMEABI_V7A",
|
||||
"arm64": "ARM64_V8A",
|
||||
"x86": "X86",
|
||||
"x86_64": "X86_64",
|
||||
"arm": "ARMEABI_V7A",
|
||||
"arm64": "ARM64_V8A",
|
||||
"riscv64": "RISCV64",
|
||||
"x86": "X86",
|
||||
"x86_64": "X86_64",
|
||||
}
|
||||
|
||||
func SupportedAbis(ctx android.ModuleContext) []string {
|
||||
|
@@ -25,7 +25,7 @@ var (
|
||||
Riscv64ArchFeatureRustFlags = map[string][]string{"": {}}
|
||||
Riscv64LinkFlags = []string{}
|
||||
|
||||
Riscv64ArchVariantRustFlags = map[string][]string{}
|
||||
Riscv64ArchVariantRustFlags = map[string][]string{"": {}}
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
Reference in New Issue
Block a user