Support building all variants.

Bug: 143217452
Test: cd external/rust; mma; atest in all TEST_MAPPING subdirs
Change-Id: I675ad5a4215baaffc99d4b4a1b5072c470b107c4
diff --git a/Android.bp b/Android.bp
index 1d122ff..7dac96d 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,8 +1,9 @@
 // This file is generated by cargo2android.py --run --dependencies.
 
-rust_library_host_rlib {
+rust_library {
     name: "libunicode_width",
     crate_name: "unicode_width",
+    host_supported: true,
     srcs: ["src/lib.rs"],
     edition: "2015",
     features: [
diff --git a/src/lib.rs b/src/lib.rs
index 1ee35c8..68e5b7e 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -49,7 +49,7 @@
 #![cfg_attr(feature = "bench", feature(test))]
 #![no_std]
 
-#[cfg(test)]
+// ANDROID: Unconditionally use std to allow building as a dylib.
 #[macro_use]
 extern crate std;