aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-07-08 04:35:03 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-07-08 04:35:03 +0000
commitc017edf97569c556a26c4b1d7d79a2c5c316a579 (patch)
tree3870c0c02033031bf9d4b1739f6dab9f16c9ac9f
parentcd8128c277a31d7dc906a235362fd575789877e6 (diff)
parent66d53d7360e4e07d84e688cd116b96ebc8c7d4fb (diff)
downloadvirtio-drivers-android14-mainline-healthfitness-release.tar.gz
Snap for 10460766 from 66d53d7360e4e07d84e688cd116b96ebc8c7d4fb to mainline-healthfitness-releaseaml_hef_341613000aml_hef_341512030aml_hef_341415040aml_hef_341311010aml_hef_341114030android14-mainline-healthfitness-release
Change-Id: Id0b6c02de288fd2867248db9bbd90a2a688ff819
-rw-r--r--Android.bp13
-rw-r--r--cargo2android.json2
-rw-r--r--patches/Android.bp.patch19
3 files changed, 25 insertions, 9 deletions
diff --git a/Android.bp b/Android.bp
index 4e47048..d111544 100644
--- a/Android.bp
+++ b/Android.bp
@@ -20,16 +20,15 @@ license {
],
}
-rust_library {
+rust_library_rlib {
name: "libvirtio_drivers",
crate_name: "virtio_drivers",
cargo_env_compat: true,
cargo_pkg_version: "0.4.0",
srcs: ["src/lib.rs"],
edition: "2018",
- no_stdlibs: true,
rustlibs: [
- "libbitflags",
+ "libbitflags-1.3.2",
"liblog_rust_nostd",
"libzerocopy_nostd",
],
@@ -37,6 +36,12 @@ rust_library {
"//apex_available:platform",
"//apex_available:anyapex",
],
+ prefer_rlib: true,
+ no_stdlibs: true,
+ stdlibs: [
+ "libcompiler_builtins.rust_sysroot",
+ "libcore.rust_sysroot",
+ ],
}
rust_test {
@@ -49,7 +54,7 @@ rust_test {
auto_gen_config: true,
edition: "2018",
rustlibs: [
- "libbitflags",
+ "libbitflags-1.3.2",
"liblog_rust",
"libzerocopy",
],
diff --git a/cargo2android.json b/cargo2android.json
index d7a5b20..8bd0ae6 100644
--- a/cargo2android.json
+++ b/cargo2android.json
@@ -2,7 +2,9 @@
"dependencies": true,
"device": true,
"features": "",
+ "force-rlib": true,
"no-host": "true",
+ "no-std": true,
"patch": "patches/Android.bp.patch",
"run": true,
"tests": true,
diff --git a/patches/Android.bp.patch b/patches/Android.bp.patch
index cd5208e..8896c52 100644
--- a/patches/Android.bp.patch
+++ b/patches/Android.bp.patch
@@ -1,17 +1,26 @@
diff --git a/Android.bp b/Android.bp
-index b08769d..230c659 100644
+index f635115..d111544 100644
--- a/Android.bp
+++ b/Android.bp
-@@ -29,9 +29,10 @@ rust_library {
- cargo_pkg_version: "0.2.0",
+@@ -28,9 +28,9 @@ rust_library_rlib {
srcs: ["src/lib.rs"],
edition: "2018",
-+ no_stdlibs: true,
rustlibs: [
- "libbitflags",
+- "libbitflags",
- "liblog_rust",
- "libzerocopy",
++ "libbitflags-1.3.2",
+ "liblog_rust_nostd",
+ "libzerocopy_nostd",
],
apex_available: [
+ "//apex_available:platform",
+@@ -54,7 +54,7 @@ rust_test {
+ auto_gen_config: true,
+ edition: "2018",
+ rustlibs: [
+- "libbitflags",
++ "libbitflags-1.3.2",
+ "liblog_rust",
+ "libzerocopy",
+ ],