aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Walbran <qwandor@google.com>2023-05-12 20:07:47 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-05-12 20:07:47 +0000
commit20f99d8fac8ba207cb46f7eef44afe2aab86827a (patch)
tree7880e10372276171179a397177d4540e126eb4d3
parent45a37b0c519e43987a45c5054880840fb770d236 (diff)
parent32cfc5c316e5ab47b562d1ce870a7c27785c2e07 (diff)
downloadciborium-ll-20f99d8fac8ba207cb46f7eef44afe2aab86827a.tar.gz
Use new no-std flag to cargo2android. am: 82304db2e3 am: c09ae9159e am: 32cfc5c316
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/ciborium-ll/+/2583345 Change-Id: Id7d342633893c959f384e9af0f6e051fe9589def Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--Android.bp11
-rw-r--r--cargo2android.json16
-rw-r--r--cargo2android_nostd.bp18
3 files changed, 22 insertions, 23 deletions
diff --git a/Android.bp b/Android.bp
index 2e835b2..b123fd2 100644
--- a/Android.bp
+++ b/Android.bp
@@ -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",
- ],
-}