aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Vander Stoep <jeffv@google.com>2020-12-21 18:43:48 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-12-21 18:43:48 +0000
commite4b23c078b456cf724ecef9ed0e8e1c03460095a (patch)
treee6bfa0563d12cfe6862d7db73fcb031cc06cb26d
parent5474011525e9980abc20dba34514cd4f41b2c9d8 (diff)
parent3dc3fd69135e5651336c2690929dcf124ce5ad02 (diff)
downloadtinyvec-e4b23c078b456cf724ecef9ed0e8e1c03460095a.tar.gz
Add Android.bp am: e4eb1c589d am: 6e2fedce24 am: 3dc3fd6913
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/tinyvec/+/1534184 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I942ddc6c7e04108ec9f1eda54015cc13d6d2faad
-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},