Enable libvmbase and pvmfw compilation on x86_64 arch

Allow compilation of libvmbase for x86_64 android devices.

For now, pvmfw_img is not enabled, as this would replace the prebuilt
image, which we don't want until all of the relevant x86-64 pvmfw
changes are merged to the main branch.

Bug: 362733888
Bug: 354116267
Test: m pvmfw_bin
Flag: EXEMPT b/362733888
Co-authored-by: Daniel Verkamp <dverkamp@google.com>
Change-Id: I067616ef9b0b6518a1360053f37bf1c57385f53e
diff --git a/guest/pvmfw/Android.bp b/guest/pvmfw/Android.bp
index f29ab4a..3ab646d 100644
--- a/guest/pvmfw/Android.bp
+++ b/guest/pvmfw/Android.bp
@@ -23,6 +23,7 @@
         "libpvmfw_avb_nostd",
         "libpvmfw_embedded_key",
         "libpvmfw_fdt_template",
+        "libservice_vm_version",
         "libstatic_assertions",
         "libtinyvec_nostd",
         "libuuid_nostd",
@@ -36,7 +37,6 @@
             rustlibs: [
                 "libaarch64_paging",
                 "libsmccc",
-                "libservice_vm_version",
             ],
         },
     },
@@ -306,6 +306,12 @@
                 ":vmbase_sections",
             ],
         },
+        android_x86_64: {
+            linker_scripts: [
+                "asm/x86_64/image.ld",
+                ":vmbase_sections",
+            ],
+        },
     },
     // `installable: false` is inherited from vmbase_elf_defaults, and that
     // hides this module from Make, which makes it impossible for the Make world
@@ -327,6 +333,9 @@
         android_arm64: {
             enabled: true,
         },
+        android_x86_64: {
+            enabled: true,
+        },
     },
 }
 
@@ -341,6 +350,9 @@
         android_arm64: {
             src: ":pvmfw_bin",
         },
+        android_x86_64: {
+            src: ":pvmfw_bin",
+        },
     },
     src: ":empty_file",
     installable: false,
diff --git a/libs/libvmbase/Android.bp b/libs/libvmbase/Android.bp
index 5f30ee1..20b3509 100644
--- a/libs/libvmbase/Android.bp
+++ b/libs/libvmbase/Android.bp
@@ -29,6 +29,9 @@
         android_arm64: {
             enabled: true,
         },
+        android_x86_64: {
+            enabled: true,
+        },
     },
 }
 
@@ -52,6 +55,9 @@
         android_arm64: {
             enabled: true,
         },
+        android_x86_64: {
+            enabled: true,
+        },
     },
     sanitize: {
         hwaddress: false,