diff options
author | Andrew Walbran <qwandor@google.com> | 2023-05-12 22:18:03 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-05-12 22:18:03 +0000 |
commit | c2dfa067bced167ea320fd9378ad84bf40662c7f (patch) | |
tree | d878ed1bb3d1ad0cf168026f2aa8104f3ddb4ced | |
parent | 75eed7fdbea18f159eee3f3d0b60753b1abe186b (diff) | |
parent | ac72b5e2b05dd1954ee6e4328c1955e591d26979 (diff) | |
download | ciborium-io-c2dfa067bced167ea320fd9378ad84bf40662c7f.tar.gz |
Use new no-std flag to cargo2android. am: 848421d1f0 am: cb6b18af61 am: 9e25f5e1b0 am: 514505b3ba am: fb7b02016e am: ac72b5e2b0
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/ciborium-io/+/2584580
Change-Id: I4cf7b837586395d1884013ce20f6fc69e704d6c5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | Android.bp | 10 | ||||
-rw-r--r-- | cargo2android.json | 16 | ||||
-rw-r--r-- | cargo2android_nostd.bp | 20 |
3 files changed, 19 insertions, 27 deletions
@@ -46,6 +46,10 @@ rust_library_rlib { srcs: ["src/lib.rs"], edition: "2021", features: ["alloc"], + apex_available: [ + "//apex_available:platform", + "//apex_available:anyapex", + ], prefer_rlib: true, no_stdlibs: true, stdlibs: [ @@ -53,8 +57,6 @@ rust_library_rlib { "libcompiler_builtins.rust_sysroot", "libcore.rust_sysroot", ], - apex_available: [ - "//apex_available:platform", - "//apex_available:anyapex", - ], + product_available: true, + vendor_available: true, } diff --git a/cargo2android.json b/cargo2android.json index eb19901..429052c 100644 --- a/cargo2android.json +++ b/cargo2android.json @@ -1,8 +1,18 @@ { - "add-toplevel-block": "cargo2android_nostd.bp", "device": true, - "features": "alloc,std,", "run": true, "dependencies": true, - "vendor-available": true + "variants": [ + { + "features": "alloc,std" + }, + { + "alloc": true, + "features": "alloc", + "force-rlib": true, + "no-host": true, + "suffix": "_nostd", + "no-std": true + } + ] } diff --git a/cargo2android_nostd.bp b/cargo2android_nostd.bp deleted file mode 100644 index 9712ce9..0000000 --- a/cargo2android_nostd.bp +++ /dev/null @@ -1,20 +0,0 @@ -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", - ], -} |