Remove rlib restriction am: fe7b4bbcd8 am: 97593b5bdd am: 51aa57afe5 am: 6353fcad0c

Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/static_assertions/+/2514612

Change-Id: I38af27cb2c70683d1dcde8c642211c7597986d73
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/Android.bp b/Android.bp
index 05a9aa3..1d545f3 100644
--- a/Android.bp
+++ b/Android.bp
@@ -20,7 +20,7 @@
     ],
 }
 
-rust_library_rlib {
+rust_library {
     name: "libstatic_assertions",
     host_supported: true,
     crate_name: "static_assertions",
diff --git a/cargo2android.json b/cargo2android.json
index f41bf78..ac5389c 100644
--- a/cargo2android.json
+++ b/cargo2android.json
@@ -1,6 +1,5 @@
 {
     "device": true,
-    "force-rlib": true,
     "no_pkg_vers": true,
     "min-sdk-version": "29",
     "vendor-available": true,
diff --git a/patches/dylib-std.patch b/patches/dylib-std.patch
new file mode 100644
index 0000000..7864526
--- /dev/null
+++ b/patches/dylib-std.patch
@@ -0,0 +1,14 @@
+diff --git a/src/lib.rs b/src/lib.rs
+index aa7e227..df47529 100644
+--- a/src/lib.rs
++++ b/src/lib.rs
+@@ -101,6 +101,9 @@
+ )]
+ #![no_std]
+ 
++#[cfg(android_dylib)]
++extern crate std;
++
+ #[cfg(feature = "proc_static_assertions")]
+ extern crate proc_static_assertions;
+ #[cfg(feature = "proc_static_assertions")]
diff --git a/src/lib.rs b/src/lib.rs
index aa7e227..df47529 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -101,6 +101,9 @@
 )]
 #![no_std]
 
+#[cfg(android_dylib)]
+extern crate std;
+
 #[cfg(feature = "proc_static_assertions")]
 extern crate proc_static_assertions;
 #[cfg(feature = "proc_static_assertions")]