aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Maurer <mmaurer@google.com>2020-07-06 13:33:37 -0700
committerMatthew Maurer <mmaurer@google.com>2020-07-06 13:33:37 -0700
commit27022a622ddfd7610300fe6766d128b7742bb213 (patch)
treeedf022dd54a322e087cc385a24e21741105f508f
parent171c5f5dc158a547145796e9909044a0ade7844d (diff)
downloadpin-project-27022a622ddfd7610300fe6766d128b7742bb213.tar.gz
Support building all variants.
Bug: 143217452 Test: cd external/rust; mma; atest in all TEST_MAPPING subdirs Change-Id: I6dae7032877e725edc4567fd6ccf13c26b6c5a73
-rw-r--r--Android.bp2
-rw-r--r--src/lib.rs3
2 files changed, 4 insertions, 1 deletions
diff --git a/Android.bp b/Android.bp
index 6cae518..48a1986 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,6 +1,6 @@
// This file is generated by cargo2android.py --run --device.
-rust_library_rlib {
+rust_library {
name: "libpin_project",
host_supported: true,
crate_name: "pin_project",
diff --git a/src/lib.rs b/src/lib.rs
index 42005cc..b1543e1 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -45,6 +45,9 @@
#![allow(clippy::mem_replace_with_default, clippy::manual_non_exhaustive)]
#![allow(clippy::needless_doctest_main)]
+// ANDROID: Use std to allow building as a dylib.
+extern crate std;
+
#[doc(inline)]
pub use pin_project_internal::pin_project;