xref: /aosp_15_r20/external/crosvm/patches/Android.bp.patch (revision bb4ee6a4ae7042d18b07a98463b9c8b875e44b39)
1diff --git a/Android.bp b/Android.bp
2index 5df1c8cdc..7bacdd74d 100644
3--- a/Android.bp
4+++ b/Android.bp
5@@ -36,6 +36,7 @@ rust_binary {
6     name: "crosvm",
7     defaults: ["crosvm_inner_defaults"],
8     host_supported: true,
9+    prefer_rlib: true,
10     crate_name: "crosvm",
11     cargo_env_compat: true,
12     cargo_pkg_version: "0.1.0",
13@@ -53,7 +54,6 @@ rust_binary {
14         "gdbstub_arch",
15         "geniezone",
16         "gfxstream",
17-        "gfxstream_stub",
18         "gpu",
19         "gpu_display",
20         "gunyah",
21@@ -134,6 +134,10 @@ rust_binary {
22         },
23         android: {
24             shared_libs: [
25+                // TODO(b/332677108): remove libc++ when display service is rewritten in rust.
26+                "libc++",
27+                "libbinder_ndk",
28+                "libnativewindow",
29                 "libprocessgroup",
30             ],
31         },
32@@ -142,6 +146,18 @@ rust_binary {
33                 "libprocessgroup",
34             ],
35         },
36+        linux_bionic_arm64: {
37+            relative_install_path: "aarch64-linux-bionic",
38+        },
39+        linux_glibc_x86_64: {
40+            relative_install_path: "x86_64-linux-gnu",
41+        },
42+        linux_musl_x86_64: {
43+            relative_install_path: "x86_64-linux-musl",
44+        },
45+        linux_musl_arm64: {
46+            relative_install_path: "aarch64-linux-musl",
47+        },
48     },
49     ld_flags: [
50         "-Wl,--rpath,\\$$ORIGIN",
51@@ -176,7 +192,6 @@ rust_test {
52         "gdbstub_arch",
53         "geniezone",
54         "gfxstream",
55-        "gfxstream_stub",
56         "gpu",
57         "gpu_display",
58         "gunyah",
59