diff options
author | Alice Wang <aliceywang@google.com> | 2023-09-19 22:01:35 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-09-19 22:01:35 +0000 |
commit | e2784d9939fed403eb21921889e2372ea43ae94a (patch) | |
tree | 902c49f6af0cd5f468900fb7bb9597e0f8857daf | |
parent | a9a405d52d24ecf0e9287f99a3cc2548a4e39f8c (diff) | |
parent | dbd34b01cb4f6b430b5788968acc089cc65c244a (diff) | |
download | coset-e2784d9939fed403eb21921889e2372ea43ae94a.tar.gz |
Add nostd variant for libcoset am: 62f7fb714c am: acf35c5f55 am: d524947244 am: dbd34b01cb
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/coset/+/2750104
Change-Id: Ic728062b86bbd66c6f850e90034533d30fa553ab
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | Android.bp | 29 | ||||
-rw-r--r-- | cargo2android.json | 16 |
2 files changed, 44 insertions, 1 deletions
@@ -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 + } + ] } |