aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Stokes <alanstokes@google.com>2023-05-02 10:06:50 +0100
committerCherrypicker Worker <android-build-cherrypicker-worker@google.com>2023-05-09 09:09:24 +0000
commit58a3496d6999119f298503f38da5ea48dd0a3874 (patch)
tree31ad1d3e82d4db3b019aa81fa63e3c71786ca8e7
parent28254c332df533ce557633785dce2069593910f5 (diff)
downloadciborium-io-58a3496d6999119f298503f38da5ea48dd0a3874.tar.gz
Add alloc to ciborium-io no_stdandroid14-dev
This makes the interface for serialization more convenient. (Note that the main module, ciborium, already has an alloc dependency via half and serde.) Bug: 266172411 Test: Builds (cherry picked from https://android-review.googlesource.com/q/commit:275646277700efc41ab7e914810b53d65fd0e1a7) Merged-In: Ia684b7dd3a18d6f77a5db02f68f4e1c67046c740 Change-Id: Ia684b7dd3a18d6f77a5db02f68f4e1c67046c740
-rw-r--r--Android.bp2
-rw-r--r--cargo2android_nostd.bp2
2 files changed, 4 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
index 156a5cc..1610254 100644
--- a/Android.bp
+++ b/Android.bp
@@ -45,9 +45,11 @@ rust_library_rlib {
cargo_pkg_version: "0.2.0",
srcs: ["src/lib.rs"],
edition: "2021",
+ features: ["alloc"],
prefer_rlib: true,
no_stdlibs: true,
stdlibs: [
+ "liballoc.rust_sysroot",
"libcompiler_builtins.rust_sysroot",
"libcore.rust_sysroot",
],
diff --git a/cargo2android_nostd.bp b/cargo2android_nostd.bp
index 6ec59a8..9712ce9 100644
--- a/cargo2android_nostd.bp
+++ b/cargo2android_nostd.bp
@@ -5,9 +5,11 @@ rust_library_rlib {
cargo_pkg_version: "0.2.0",
srcs: ["src/lib.rs"],
edition: "2021",
+ features: ["alloc"],
prefer_rlib: true,
no_stdlibs: true,
stdlibs: [
+ "liballoc.rust_sysroot",
"libcompiler_builtins.rust_sysroot",
"libcore.rust_sysroot",
],