aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-05-11 23:18:16 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-05-11 23:18:16 +0000
commita183e062f7c871500c3231e487948be102beafb6 (patch)
tree31ad1d3e82d4db3b019aa81fa63e3c71786ca8e7
parent353e8a11396f178557cd0dd856a9e564260cab5d (diff)
parent58a3496d6999119f298503f38da5ea48dd0a3874 (diff)
downloadciborium-io-android14-release.tar.gz
Change-Id: I0da57dd412d7690801cd2c4249aa6efc39be6041
-rw-r--r--Android.bp21
-rw-r--r--cargo2android.json1
-rw-r--r--cargo2android_nostd.bp20
3 files changed, 42 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
index 17c243e..1610254 100644
--- a/Android.bp
+++ b/Android.bp
@@ -37,3 +37,24 @@ 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",
+ features: ["alloc"],
+ prefer_rlib: true,
+ no_stdlibs: true,
+ stdlibs: [
+ "liballoc.rust_sysroot",
+ "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..9712ce9
--- /dev/null
+++ b/cargo2android_nostd.bp
@@ -0,0 +1,20 @@
+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",
+ features: ["alloc"],
+ prefer_rlib: true,
+ no_stdlibs: true,
+ stdlibs: [
+ "liballoc.rust_sysroot",
+ "libcompiler_builtins.rust_sysroot",
+ "libcore.rust_sysroot",
+ ],
+ apex_available: [
+ "//apex_available:platform",
+ "//apex_available:anyapex",
+ ],
+}