aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Stokes <alanstokes@google.com>2023-04-25 15:23:15 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-04-25 15:23:15 +0000
commitc98ced3f9e2267900ddee654d77caa4e19612f98 (patch)
treeeec11004c34086d701c7c714b4aa0d506c3ee837
parent44d0cd799299d96e4160738a9aaaf6ffd928fc58 (diff)
parent6cb80b001e92d1ce3be758caa43a9db787070562 (diff)
downloadciborium-io-c98ced3f9e2267900ddee654d77caa4e19612f98.tar.gz
Create no_std builds of ciborium and dependencies am: 6cb80b001e
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/ciborium-io/+/2557332 Change-Id: I679eca106668a63a366f83d8db00e5c4d0fac1b2 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--Android.bp19
-rw-r--r--cargo2android.json1
-rw-r--r--cargo2android_nostd.bp18
3 files changed, 38 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
index 17c243e..156a5cc 100644
--- a/Android.bp
+++ b/Android.bp
@@ -37,3 +37,22 @@ rust_library {
product_available: true,
vendor_available: true,
}
+
+rust_library_rlib {
+ name: "libciborium_io_nostd",
+ crate_name: "ciborium_io",
+ cargo_env_compat: true,
+ cargo_pkg_version: "0.2.0",
+ srcs: ["src/lib.rs"],
+ edition: "2021",
+ prefer_rlib: true,
+ no_stdlibs: true,
+ stdlibs: [
+ "libcompiler_builtins.rust_sysroot",
+ "libcore.rust_sysroot",
+ ],
+ apex_available: [
+ "//apex_available:platform",
+ "//apex_available:anyapex",
+ ],
+}
diff --git a/cargo2android.json b/cargo2android.json
index 4a369d5..eb19901 100644
--- a/cargo2android.json
+++ b/cargo2android.json
@@ -1,4 +1,5 @@
{
+ "add-toplevel-block": "cargo2android_nostd.bp",
"device": true,
"features": "alloc,std,",
"run": true,
diff --git a/cargo2android_nostd.bp b/cargo2android_nostd.bp
new file mode 100644
index 0000000..6ec59a8
--- /dev/null
+++ b/cargo2android_nostd.bp
@@ -0,0 +1,18 @@
+rust_library_rlib {
+ name: "libciborium_io_nostd",
+ crate_name: "ciborium_io",
+ cargo_env_compat: true,
+ cargo_pkg_version: "0.2.0",
+ srcs: ["src/lib.rs"],
+ edition: "2021",
+ prefer_rlib: true,
+ no_stdlibs: true,
+ stdlibs: [
+ "libcompiler_builtins.rust_sysroot",
+ "libcore.rust_sysroot",
+ ],
+ apex_available: [
+ "//apex_available:platform",
+ "//apex_available:anyapex",
+ ],
+}