aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Walbran <qwandor@google.com>2023-01-09 17:07:31 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-01-09 17:07:31 +0000
commitfdfd2edd9b6d6a6ff843425d416ef046df9420aa (patch)
treeedde13a0369c03135b816b6f9244127eae07da0e
parent4b3042026b42e6069d97fc4e73ae05ee823a00b9 (diff)
parentd322c0c31558bacd4daebc2f1e0adee2d2d7b6ba (diff)
downloadbyteorder-fdfd2edd9b6d6a6ff843425d416ef046df9420aa.tar.gz
Add no-std version of byteorder library. am: 622b61e52b am: d322c0c315
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/byteorder/+/2375710 Change-Id: I08423fe26394d2f1e39ee7ae16d5cc057e9fe854 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--Android.bp18
-rw-r--r--cargo2android.json5
-rw-r--r--cargo2android_nostd.bp15
3 files changed, 33 insertions, 5 deletions
diff --git a/Android.bp b/Android.bp
index 0c62ecb..cb2d957 100644
--- a/Android.bp
+++ b/Android.bp
@@ -52,7 +52,23 @@ rust_library {
],
apex_available: [
"//apex_available:platform",
- "com.android.virt",
+ "//apex_available:anyapex",
+ ],
+ vendor_available: true,
+}
+
+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,
}
diff --git a/cargo2android.json b/cargo2android.json
index 721cc1a..e63efdb 100644
--- a/cargo2android.json
+++ b/cargo2android.json
@@ -1,8 +1,5 @@
{
- "apex-available": [
- "//apex_available:platform",
- "com.android.virt"
- ],
+ "add-toplevel-block": "cargo2android_nostd.bp",
"dependencies": true,
"device": true,
"run": true,
diff --git a/cargo2android_nostd.bp b/cargo2android_nostd.bp
new file mode 100644
index 0000000..1db2e43
--- /dev/null
+++ b/cargo2android_nostd.bp
@@ -0,0 +1,15 @@
+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