diff options
author | Joel Galenson <jgalenson@google.com> | 2020-10-05 08:12:07 -0700 |
---|---|---|
committer | Joel Galenson <jgalenson@google.com> | 2020-10-06 06:47:44 -0700 |
commit | e202edd4e3bda6f3f9a8e33fe4cef42de083ef59 (patch) | |
tree | b1a955a83d134a5acb3af5a6e3bdd9320d995259 | |
parent | e9cc204b57f93384925d367ea3a50a9a6c4913cd (diff) | |
download | pin-project-lite-e202edd4e3bda6f3f9a8e33fe4cef42de083ef59.tar.gz |
Add Android.bp
Test: Build
Change-Id: Ieab092d528b92a312dd12d1c9129dcf013566b67
-rw-r--r-- | Android.bp | 9 | ||||
-rw-r--r-- | patches/std.diff | 14 | ||||
-rw-r--r-- | src/lib.rs | 3 |
3 files changed, 26 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp new file mode 100644 index 0000000..2ce3c68 --- /dev/null +++ b/Android.bp @@ -0,0 +1,9 @@ +// This file is generated by cargo2android.py --device --run --dependencies. + +rust_library { + name: "libpin_project_lite", + host_supported: true, + crate_name: "pin_project_lite", + srcs: ["src/lib.rs"], + edition: "2018", +} diff --git a/patches/std.diff b/patches/std.diff new file mode 100644 index 0000000..4ae8c47 --- /dev/null +++ b/patches/std.diff @@ -0,0 +1,14 @@ +diff --git a/src/lib.rs b/src/lib.rs +index 304b0da..4c70e26 100644 +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -81,6 +81,9 @@ + // mem::take and #[non_exhaustive] requires Rust 1.40 + #![allow(clippy::mem_replace_with_default, clippy::manual_non_exhaustive)] + ++// ANDROID: Use std to allow building as a dylib. ++extern crate std; ++ + /// A macro that creates a projection type covering all the fields of struct. + /// + /// This macro creates a projection type according to the following rules: @@ -81,6 +81,9 @@ // mem::take and #[non_exhaustive] requires Rust 1.40 #![allow(clippy::mem_replace_with_default, clippy::manual_non_exhaustive)] +// ANDROID: Use std to allow building as a dylib. +extern crate std; + /// A macro that creates a projection type covering all the fields of struct. /// /// This macro creates a projection type according to the following rules: |