aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Vander Stoep <jeffv@google.com>2020-12-21 17:57:08 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-12-21 17:57:08 +0000
commit6e2fedce249316c3a619887693878876f660c8d3 (patch)
treee6bfa0563d12cfe6862d7db73fcb031cc06cb26d
parent15522e2934d0bf3bf508f246aef9ef7f2c0ea0da (diff)
parente4eb1c589d2773232dccfb0cf6a7b99f97c297e5 (diff)
downloadtinyvec-6e2fedce249316c3a619887693878876f660c8d3.tar.gz
Add Android.bp am: e4eb1c589d
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/tinyvec/+/1534184 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ibbe5404c8c594527ff00ed3b68fc51b19bdea30b
-rw-r--r--Android.bp20
-rw-r--r--TEST_MAPPING19
-rw-r--r--patches/std.diff14
-rw-r--r--src/lib.rs3
4 files changed, 56 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..bfe5e04
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,20 @@
+// This file is generated by cargo2android.py --run --device --dependencies --features=alloc,default,tinyvec_macros.
+
+rust_library {
+ name: "libtinyvec",
+ host_supported: true,
+ crate_name: "tinyvec",
+ srcs: ["src/lib.rs"],
+ edition: "2018",
+ features: [
+ "alloc",
+ "default",
+ "tinyvec_macros",
+ ],
+ rustlibs: [
+ "libtinyvec_macros",
+ ],
+}
+
+// dependent_library ["feature_list"]
+// tinyvec_macros-0.1.0
diff --git a/TEST_MAPPING b/TEST_MAPPING
new file mode 100644
index 0000000..fb559f1
--- /dev/null
+++ b/TEST_MAPPING
@@ -0,0 +1,19 @@
+// Generated by cargo2android.py for tests in Android.bp
+{
+ "presubmit": [
+ {
+ "host": true,
+ "name": "tinyvec_host_test_src_lib"
+ },
+ {
+ "name": "tinyvec_device_test_src_lib"
+ },
+ {
+ "host": true,
+ "name": "tinyvec_host_test_tests_arrayvec"
+ },
+ {
+ "name": "tinyvec_device_test_tests_arrayvec"
+ }
+ ]
+}
diff --git a/patches/std.diff b/patches/std.diff
new file mode 100644
index 0000000..36d5c7d
--- /dev/null
+++ b/patches/std.diff
@@ -0,0 +1,14 @@
+diff --git a/src/lib.rs b/src/lib.rs
+index c26f0c5..ce06601 100644
+--- a/src/lib.rs
++++ b/src/lib.rs
+@@ -66,6 +66,9 @@
+ //! the `Array` trait. The actual usage of the crate is not expected to break
+ //! significantly in this transition.
+
++// ANDROID: Unconditionally use std to allow building as a dylib.
++extern crate std;
++
+ #[allow(unused_imports)]
+ use core::{
+ borrow::{Borrow, BorrowMut},
diff --git a/src/lib.rs b/src/lib.rs
index c26f0c5..ce06601 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -66,6 +66,9 @@
//! the `Array` trait. The actual usage of the crate is not expected to break
//! significantly in this transition.
+// ANDROID: Unconditionally use std to allow building as a dylib.
+extern crate std;
+
#[allow(unused_imports)]
use core::{
borrow::{Borrow, BorrowMut},