aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Android.bp2
-rw-r--r--cargo2android_nostd.bp2
2 files changed, 4 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
index 156a5cc..1610254 100644
--- a/Android.bp
+++ b/Android.bp
@@ -45,9 +45,11 @@ rust_library_rlib {
cargo_pkg_version: "0.2.0",
srcs: ["src/lib.rs"],
edition: "2021",
+ features: ["alloc"],
prefer_rlib: true,
no_stdlibs: true,
stdlibs: [
+ "liballoc.rust_sysroot",
"libcompiler_builtins.rust_sysroot",
"libcore.rust_sysroot",
],
diff --git a/cargo2android_nostd.bp b/cargo2android_nostd.bp
index 6ec59a8..9712ce9 100644
--- a/cargo2android_nostd.bp
+++ b/cargo2android_nostd.bp
@@ -5,9 +5,11 @@ rust_library_rlib {
cargo_pkg_version: "0.2.0",
srcs: ["src/lib.rs"],
edition: "2021",
+ features: ["alloc"],
prefer_rlib: true,
no_stdlibs: true,
stdlibs: [
+ "liballoc.rust_sysroot",
"libcompiler_builtins.rust_sysroot",
"libcore.rust_sysroot",
],