aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-09-21 22:00:49 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-09-21 22:00:49 +0000
commit8eb65b8d01bd22c3612d7ff30c80df9ced9ac437 (patch)
tree902c49f6af0cd5f468900fb7bb9597e0f8857daf
parentdfdced59b5de28bcc262502407fd943c1fb4a648 (diff)
parent4ce4f35a1e65564081b87761d289201167b0a506 (diff)
downloadcoset-8eb65b8d01bd22c3612d7ff30c80df9ced9ac437.tar.gz
Snap for 10843824 from 4ce4f35a1e65564081b87761d289201167b0a506 to 24Q1-release
Change-Id: Ife475501ed864e08ebe59dea96488b522f464b75
-rw-r--r--Android.bp29
-rw-r--r--cargo2android.json16
2 files changed, 44 insertions, 1 deletions
diff --git a/Android.bp b/Android.bp
index 7dcf870..a44aa1c 100644
--- a/Android.bp
+++ b/Android.bp
@@ -20,6 +20,7 @@ license {
rust_test {
name: "coset_test_src_lib",
+ // has rustc warnings
host_supported: true,
crate_name: "coset",
cargo_env_compat: true,
@@ -41,6 +42,7 @@ rust_test {
rust_library {
name: "libcoset",
+ // has rustc warnings
host_supported: true,
crate_name: "coset",
cargo_env_compat: true,
@@ -59,3 +61,30 @@ rust_library {
product_available: true,
vendor_available: true,
}
+
+rust_library_rlib {
+ name: "libcoset_nostd",
+ // has rustc warnings
+ crate_name: "coset",
+ cargo_env_compat: true,
+ cargo_pkg_version: "0.3.4",
+ srcs: ["src/lib.rs"],
+ edition: "2018",
+ rustlibs: [
+ "libciborium_nostd",
+ "libciborium_io_nostd",
+ ],
+ apex_available: [
+ "//apex_available:platform",
+ "//apex_available:anyapex",
+ ],
+ prefer_rlib: true,
+ no_stdlibs: true,
+ stdlibs: [
+ "liballoc.rust_sysroot",
+ "libcompiler_builtins.rust_sysroot",
+ "libcore.rust_sysroot",
+ ],
+ product_available: true,
+ vendor_available: true,
+}
diff --git a/cargo2android.json b/cargo2android.json
index cf7ea4a..3557c01 100644
--- a/cargo2android.json
+++ b/cargo2android.json
@@ -3,5 +3,19 @@
"run": true,
"dependencies": true,
"vendor-available": true,
- "tests": true
+ "tests": true,
+ "variants": [
+ {
+ },
+ {
+ "alloc": true,
+ "dependency_suffix": "_nostd",
+ "features": "",
+ "force-rlib": true,
+ "no-host": true,
+ "suffix": "_nostd",
+ "no-std": true,
+ "tests": false
+ }
+ ]
}