diff options
author | Andrew Walbran <qwandor@google.com> | 2023-05-12 15:56:07 +0000 |
---|---|---|
committer | Andrew Walbran <qwandor@google.com> | 2023-05-12 15:56:07 +0000 |
commit | 6159b18b27f1172cc8bfe32e20e01ce9050b84a6 (patch) | |
tree | ea70d954d661d2cd8415f32097c5a20398c35d39 | |
parent | 3ebe7e4d965f56cc1de084d488412f698ca6cc4f (diff) | |
download | buddy_system_allocator-6159b18b27f1172cc8bfe32e20e01ce9050b84a6.tar.gz |
Use new no-std flag to cargo2android.
Bug: 279614907
Test: m pvmfw
Change-Id: Iadbc6c7d020e1f4aaf27bc0e8adb0d4440914a4a
-rw-r--r-- | Android.bp | 10 | ||||
-rw-r--r-- | cargo2android.json | 5 | ||||
-rw-r--r-- | patches/Android.bp.patch | 13 |
3 files changed, 13 insertions, 15 deletions
@@ -22,7 +22,6 @@ license { rust_library_rlib { name: "libbuddy_system_allocator", - host_supported: true, crate_name: "buddy_system_allocator", cargo_env_compat: true, cargo_pkg_version: "0.9.0", @@ -40,4 +39,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 1b9849e..b80410f 100644 --- a/cargo2android.json +++ b/cargo2android.json @@ -1,7 +1,10 @@ { + "alloc": true, "dependencies": true, + "dependency-suffix": "_nostd", "device": true, "force-rlib": true, - "patch": "patches/Android.bp.patch", + "no-host": true, + "no-std": true, "run": true } diff --git a/patches/Android.bp.patch b/patches/Android.bp.patch deleted file mode 100644 index 58b4878..0000000 --- a/patches/Android.bp.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Android.bp b/Android.bp -index bbd9e06..6dae9e8 100644 ---- a/Android.bp -+++ b/Android.bp -@@ -61,7 +61,7 @@ rust_library_rlib { - "use_spin", - ], - rustlibs: [ -- "libspin", -+ "libspin_nostd", - ], - apex_available: [ - "//apex_available:platform", |