diff options
author | Andrew Walbran <qwandor@google.com> | 2023-01-06 17:13:26 +0000 |
---|---|---|
committer | Andrew Walbran <qwandor@google.com> | 2023-01-06 17:13:26 +0000 |
commit | 622b61e52b895c88eb5dc1cc55fad885ac6072f6 (patch) | |
tree | edde13a0369c03135b816b6f9244127eae07da0e | |
parent | 4b3042026b42e6069d97fc4e73ae05ee823a00b9 (diff) | |
download | byteorder-622b61e52b895c88eb5dc1cc55fad885ac6072f6.tar.gz |
Add no-std version of byteorder library.main-16k-with-phones
This is needed for pVM firmware, via virtio-drivers and zerocopy.
Bug: 237249743
Test: m vmbase_example_bin pvmfw_bin
Change-Id: I1a7bf375a3b75913b8b75ca4ac2cd69c3cb13bc5
-rw-r--r-- | Android.bp | 18 | ||||
-rw-r--r-- | cargo2android.json | 5 | ||||
-rw-r--r-- | cargo2android_nostd.bp | 15 |
3 files changed, 33 insertions, 5 deletions
@@ -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 |