Create no_std builds of ciborium and dependencies am: 404166a074 am: b9a6957e71
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/rust/crates/ciborium-ll/+/23106496
Change-Id: Iefd1a4e28cf730ac105e6286b66ed6cf48a35227
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/Android.bp b/Android.bp
index 30b1224..2e835b2 100644
--- a/Android.bp
+++ b/Android.bp
@@ -57,3 +57,22 @@
product_available: true,
vendor_available: true,
}
+
+rust_library_rlib {
+ name: "libciborium_ll_nostd",
+ crate_name: "ciborium_ll",
+ cargo_env_compat: true,
+ cargo_pkg_version: "0.2.0",
+ srcs: ["src/lib.rs"],
+ edition: "2021",
+ prefer_rlib: true,
+ no_stdlibs: true,
+ rustlibs: [
+ "libciborium_io_nostd",
+ "libhalf_nostd",
+ ],
+ apex_available: [
+ "//apex_available:platform",
+ "//apex_available:anyapex",
+ ],
+}
diff --git a/cargo2android.json b/cargo2android.json
index cf7ea4a..e7673ba 100644
--- a/cargo2android.json
+++ b/cargo2android.json
@@ -1,4 +1,5 @@
{
+ "add-toplevel-block": "cargo2android_nostd.bp",
"device": true,
"run": true,
"dependencies": true,
diff --git a/cargo2android_nostd.bp b/cargo2android_nostd.bp
new file mode 100644
index 0000000..9912edd
--- /dev/null
+++ b/cargo2android_nostd.bp
@@ -0,0 +1,18 @@
+rust_library_rlib {
+ name: "libciborium_ll_nostd",
+ crate_name: "ciborium_ll",
+ cargo_env_compat: true,
+ cargo_pkg_version: "0.2.0",
+ srcs: ["src/lib.rs"],
+ edition: "2021",
+ prefer_rlib: true,
+ no_stdlibs: true,
+ rustlibs: [
+ "libciborium_io_nostd",
+ "libhalf_nostd",
+ ],
+ apex_available: [
+ "//apex_available:platform",
+ "//apex_available:anyapex",
+ ],
+}