Support building all variants.

Bug: 143217452
Test: cd external/rust; mma; atest in all TEST_MAPPING subdirs
Change-Id: I79ecd79e861430eedd062d24b7118e475985603b
diff --git a/Android.bp b/Android.bp
index 1bb2d62..a51668d 100644
--- a/Android.bp
+++ b/Android.bp
@@ -2,7 +2,7 @@
 // Manually split host and device tests,
 // and link in static libraries for device tests.
 
-rust_library_rlib {
+rust_library {
     name: "libpin_utils",
     host_supported: true,
     crate_name: "pin_utils",
@@ -16,7 +16,7 @@
     test_suites: ["general-tests"],
     auto_gen_config: true,
     edition: "2018",
-    rlibs: [
+    rustlibs: [
         "libpin_utils",
     ],
 }
diff --git a/src/lib.rs b/src/lib.rs
index 6198e98..48ac257 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -6,6 +6,9 @@
 #![allow(unknown_lints)]
 #![doc(html_root_url = "https://docs.rs/pin-utils/0.1.0")]
 
+// ANDROID: Use std to allow building as a dylib.
+extern crate std;
+
 #[doc(hidden)]
 pub mod core_reexport {
     pub use core::*;