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
diff --git a/build/codegen.go b/build/codegen.go
index 96dd223..66569be 100644
--- a/build/codegen.go
+++ b/build/codegen.go
@@ -62,6 +62,8 @@
 			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 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 3f8fd2a..f248205 100644
--- a/dex2oat/Android.bp
+++ b/dex2oat/Android.bp
@@ -249,6 +249,12 @@
                 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",