diff options
author | Andrew Walbran <qwandor@google.com> | 2023-05-12 14:45:51 +0000 |
---|---|---|
committer | Andrew Walbran <qwandor@google.com> | 2023-05-12 14:45:51 +0000 |
commit | 82304db2e3ea9aad5e9a686eba2c12c6f6ae9761 (patch) | |
tree | 7880e10372276171179a397177d4540e126eb4d3 | |
parent | 7437881bf5d5bbc017315cc62c04640c3d06d409 (diff) | |
download | ciborium-ll-82304db2e3ea9aad5e9a686eba2c12c6f6ae9761.tar.gz |
Use new no-std flag to cargo2android.
Bug: 279614907
Test: m pvmfw
Change-Id: I6b6d4dfee1f1687b8dae8cab5e007705eeb15405
-rw-r--r-- | Android.bp | 11 | ||||
-rw-r--r-- | cargo2android.json | 16 | ||||
-rw-r--r-- | cargo2android_nostd.bp | 18 |
3 files changed, 22 insertions, 23 deletions
@@ -65,8 +65,6 @@ rust_library_rlib { cargo_pkg_version: "0.2.0", srcs: ["src/lib.rs"], edition: "2021", - prefer_rlib: true, - no_stdlibs: true, rustlibs: [ "libciborium_io_nostd", "libhalf_nostd", @@ -75,4 +73,13 @@ rust_library_rlib { "//apex_available:platform", "//apex_available:anyapex", ], + prefer_rlib: true, + no_stdlibs: true, + stdlibs: [ + "liballoc.rust_sysroot", + "libcompiler_builtins.rust_sysroot", + "libcore.rust_sysroot", + ], + product_available: true, + vendor_available: true, } diff --git a/cargo2android.json b/cargo2android.json index e7673ba..6992142 100644 --- a/cargo2android.json +++ b/cargo2android.json @@ -1,8 +1,18 @@ { - "add-toplevel-block": "cargo2android_nostd.bp", "device": true, "run": true, "dependencies": true, - "vendor-available": true, - "tests": true + "variants": [ + { + "tests": true + }, + { + "alloc": true, + "dependency_suffix": "_nostd", + "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 9912edd..0000000 --- a/cargo2android_nostd.bp +++ /dev/null @@ -1,18 +0,0 @@ -rust_library_rlib { - name: "libciborium_ll_nostd", - crate_name: "ciborium_ll", - cargo_env_compat: true, - cargo_pkg_version: "0.2.0", - srcs: ["src/lib.rs"], - edition: "2021", - prefer_rlib: true, - no_stdlibs: true, - rustlibs: [ - "libciborium_io_nostd", - "libhalf_nostd", - ], - apex_available: [ - "//apex_available:platform", - "//apex_available:anyapex", - ], -} |