Allow using lazy_static from Mainline modules

Test: m
Bug: 155855709
Change-Id: I53966d839201a2c9f24e3a3effe50d951f9feeba
diff --git a/Android.bp b/Android.bp
index 283ec6d..7c28208 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,4 +1,4 @@
-// This file is generated by cargo2android.py --run --dependencies --device.
+// This file is generated by cargo2android.py --run --device --dependencies --patch=patches/Android.bp.diff.
 
 rust_library {
     name: "liblazy_static",
@@ -6,4 +6,9 @@
     crate_name: "lazy_static",
     srcs: ["src/lib.rs"],
     edition: "2015",
+    apex_available: [
+        "//apex_available:platform",
+        "com.android.resolv",
+    ],
+    min_sdk_version: "29",
 }
diff --git a/patches/Android.bp.diff b/patches/Android.bp.diff
new file mode 100644
index 0000000..3c1b4cb
--- /dev/null
+++ b/patches/Android.bp.diff
@@ -0,0 +1,20 @@
+--- Android.bp	2020-12-14 18:47:48.373508351 +0900
++++ Android.bp.new	2020-12-14 18:47:04.753908034 +0900
+@@ -2,8 +2,17 @@
+ 
+ rust_library {
+     name: "liblazy_static",
++    // has rustc warnings
+     host_supported: true,
+     crate_name: "lazy_static",
+     srcs: ["src/lib.rs"],
+     edition: "2015",
++    apex_available: [
++        "//apex_available:platform",
++        "com.android.resolv",
++    ],
++    min_sdk_version: "29",
+ }
++
++// dependent_library ["feature_list"]
++//   doc-comment-0.3.3