aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Drysdale <drysdale@google.com>2023-10-04 12:03:37 +0100
committerDavid Drysdale <drysdale@google.com>2023-10-04 12:04:40 +0100
commita71b01282be197b1b7541718562e8186b7e3bdce (patch)
tree24a423aebfde2bc9e465dc44127aaa0c55a3c610
parent8f02481fb03a0a69f44f91ca87620df63701cd44 (diff)
downloadzeroize-a71b01282be197b1b7541718562e8186b7e3bdce.tar.gz
Add alloc to _nostd variant
Bug: 303192701 Test: build both variants Change-Id: I724d92d37fa553c84ef65c0e0ebd80672e7c829e
-rw-r--r--Android.bp6
-rw-r--r--cargo2android.json6
2 files changed, 8 insertions, 4 deletions
diff --git a/Android.bp b/Android.bp
index 157f1ab..e56d529 100644
--- a/Android.bp
+++ b/Android.bp
@@ -60,7 +60,10 @@ rust_library_rlib {
cargo_pkg_version: "1.6.0",
srcs: ["src/lib.rs"],
edition: "2021",
- features: ["zeroize_derive"],
+ features: [
+ "alloc",
+ "zeroize_derive",
+ ],
proc_macros: ["libzeroize_derive"],
apex_available: [
"//apex_available:platform",
@@ -69,6 +72,7 @@ rust_library_rlib {
prefer_rlib: true,
no_stdlibs: true,
stdlibs: [
+ "liballoc.rust_sysroot",
"libcompiler_builtins.rust_sysroot",
"libcore.rust_sysroot",
],
diff --git a/cargo2android.json b/cargo2android.json
index b6a9107..9ae6cab 100644
--- a/cargo2android.json
+++ b/cargo2android.json
@@ -3,17 +3,17 @@
"run": true,
"min_sdk_version": "Tiramisu",
"vendor-available": true,
+ "features": "alloc,zeroize_derive",
"variants": [
{
- "features": "alloc,zeroize_derive",
"tests": true
},
{
- "features": "zeroize_derive",
"force-rlib": true,
"no-host": true,
"suffix": "_nostd",
- "no-std": true
+ "no-std": true,
+ "alloc": true
}
]
}