diff options
author | Andrew Walbran <qwandor@google.com> | 2023-05-12 21:29:26 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-05-12 21:29:26 +0000 |
commit | 573504cf547262d4a3097ada33cad242d19ec903 (patch) | |
tree | 37f0572d631a3250ae9de6d3977fb9542013822c | |
parent | a17ea80e232c73441c35e5f70d4ba3b2ddb9791c (diff) | |
parent | 25989e7678ebaa2679e6232275f1714c0c321d61 (diff) | |
download | half-573504cf547262d4a3097ada33cad242d19ec903.tar.gz |
Use new no-std flag to cargo2android. am: 7402cc0405 am: 051bdce8af am: bd7357e1c9 am: a4c0832273 am: 25989e7678
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/half/+/2585967
Change-Id: I3337324d971937e204e6476346d5cd608884b274
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | Android.bp | 14 | ||||
-rw-r--r-- | cargo2android.json | 14 | ||||
-rw-r--r-- | cargo2android_nostd.bp | 22 |
3 files changed, 19 insertions, 31 deletions
@@ -65,6 +65,11 @@ rust_library_rlib { cargo_pkg_version: "2.2.1", srcs: ["src/lib.rs"], edition: "2021", + features: ["alloc"], + apex_available: [ + "//apex_available:platform", + "//apex_available:anyapex", + ], prefer_rlib: true, no_stdlibs: true, stdlibs: [ @@ -72,11 +77,6 @@ rust_library_rlib { "libcompiler_builtins.rust_sysroot", "libcore.rust_sysroot", ], - features: [ - "alloc", - ], - apex_available: [ - "//apex_available:platform", - "//apex_available:anyapex", - ], + product_available: true, + vendor_available: true, } diff --git a/cargo2android.json b/cargo2android.json index 2f73971..1f63124 100644 --- a/cargo2android.json +++ b/cargo2android.json @@ -1,6 +1,16 @@ { - "add-toplevel-block": "cargo2android_nostd.bp", "device": true, "run": true, - "vendor-available": true + "variants": [ + { + }, + { + "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 db81b1a..0000000 --- a/cargo2android_nostd.bp +++ /dev/null @@ -1,22 +0,0 @@ -rust_library_rlib { - name: "libhalf_nostd", - crate_name: "half", - cargo_env_compat: true, - cargo_pkg_version: "2.2.1", - srcs: ["src/lib.rs"], - edition: "2021", - prefer_rlib: true, - no_stdlibs: true, - stdlibs: [ - "liballoc.rust_sysroot", - "libcompiler_builtins.rust_sysroot", - "libcore.rust_sysroot", - ], - features: [ - "alloc", - ], - apex_available: [ - "//apex_available:platform", - "//apex_available:anyapex", - ], -} |