aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Walbran <qwandor@google.com>2023-05-12 18:41:51 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-05-12 18:41:51 +0000
commitf11a2c385707f6c9e59d59b32b15783b2d300636 (patch)
tree8f8e4cb140867be006f0d4c05398ffcbc805f089
parent12d30fe44af387b4f013df7e153ebe2965c5edf6 (diff)
parentbb51101ee83be8bf608b9f32efd44bf6bf35609e (diff)
downloadbyteorder-f11a2c385707f6c9e59d59b32b15783b2d300636.tar.gz
Use new no-std flag to cargo2android. am: 81e4c4d68c am: 69440f2e49 am: bb51101ee8
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/byteorder/+/2586825 Change-Id: I027f63e5048ab91858df1ad8745524f94c2445fa Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--Android.bp5
-rw-r--r--cargo2android.json13
-rw-r--r--cargo2android_nostd.bp15
3 files changed, 16 insertions, 17 deletions
diff --git a/Android.bp b/Android.bp
index f327378..4af177a 100644
--- a/Android.bp
+++ b/Android.bp
@@ -65,11 +65,16 @@ rust_library_rlib {
cargo_pkg_version: "1.4.3",
srcs: ["src/lib.rs"],
edition: "2018",
+ apex_available: [
+ "//apex_available:platform",
+ "//apex_available:anyapex",
+ ],
prefer_rlib: true,
no_stdlibs: true,
stdlibs: [
"libcompiler_builtins.rust_sysroot",
"libcore.rust_sysroot",
],
+ product_available: true,
vendor_available: true,
}
diff --git a/cargo2android.json b/cargo2android.json
index e63efdb..1014789 100644
--- a/cargo2android.json
+++ b/cargo2android.json
@@ -1,7 +1,16 @@
{
- "add-toplevel-block": "cargo2android_nostd.bp",
"dependencies": true,
"device": true,
"run": true,
- "vendor-available": true
+ "variants": [
+ {
+ },
+ {
+ "features": "",
+ "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 1db2e43..0000000
--- a/cargo2android_nostd.bp
+++ /dev/null
@@ -1,15 +0,0 @@
-rust_library_rlib {
- name: "libbyteorder_nostd",
- crate_name: "byteorder",
- cargo_env_compat: true,
- cargo_pkg_version: "1.4.3",
- srcs: ["src/lib.rs"],
- edition: "2018",
- prefer_rlib: true,
- no_stdlibs: true,
- stdlibs: [
- "libcompiler_builtins.rust_sysroot",
- "libcore.rust_sysroot",
- ],
- vendor_available: true,
-} \ No newline at end of file