summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2022-10-03 12:50:25 -0700
committer Colin Cross <ccross@android.com> 2022-10-05 22:03:21 +0000
commit0b325abb397452b69cf259d193c840b1242d8371 (patch)
tree8ed7db0b774f26e6d1262f31207a3ff523c73145
parent9e73fcdbbdc302d9ed680662b0f86376c8baab10 (diff)
Fix panics in art build code when target arch is riscv64
Fix panics in codegen.go and PGO when using riscv64 as the target arch. Bug: 250918230 Test: lunch aosp_riscv64-userdebug && m ALLOW_MISSING_DEPENDENCIES=true nothing Change-Id: I97820082b7d51e939f01e782356795a12f84f8a1
-rw-r--r--build/codegen.go4
-rw-r--r--dex2oat/Android.bp6
2 files changed, 9 insertions, 1 deletions
diff --git a/build/codegen.go b/build/codegen.go
index 96dd223356..66569becf9 100644
--- a/build/codegen.go
+++ b/build/codegen.go
@@ -62,6 +62,8 @@ func codegen(ctx android.LoadHookContext, c *codegenProperties, t moduleType) {
arch = &c.Codegen.Arm
case "arm64":
arch = &c.Codegen.Arm64
+ case "riscv64":
+ arch = &c.Codegen.Riscv64
case "x86":
arch = &c.Codegen.X86
case "x86_64":
@@ -205,7 +207,7 @@ type codegenArchProperties struct {
type codegenProperties struct {
Codegen struct {
- Arm, Arm64, X86, X86_64 codegenArchProperties
+ Arm, Arm64, Riscv64, X86, X86_64 codegenArchProperties
}
}
diff --git a/dex2oat/Android.bp b/dex2oat/Android.bp
index 3f8fd2a190..f248205e14 100644
--- a/dex2oat/Android.bp
+++ b/dex2oat/Android.bp
@@ -249,6 +249,12 @@ cc_defaults {
profile_file: "art/dex2oat_arm_arm64.profdata",
},
},
+ android_riscv64: {
+ pgo: {
+ enable_profile_use: false,
+ profile_file: "",
+ },
+ },
android_x86_64: {
pgo: {
profile_file: "art/dex2oat_x86_x86_64.profdata",