Snap for 7325276 from c9e1025196b802e60860ff6082cb78f7edb0aa9b to sc-release
Change-Id: Ia545dfb735ba1e4e3ed56aa7e6a7de82f6e8515d
diff --git a/Android.bp b/Android.bp
index ae913ce..d53b9c9 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,4 +1,4 @@
-// This file is generated by cargo2android.py --run --device --tests --dependencies --patch=patches/Android.bp.patch.
+// This file is generated by cargo2android.py --config cargo2android.json.
// Do not modify this file as changes will be overridden on upgrade.
package {
@@ -25,11 +25,12 @@
srcs: ["src/lib.rs"],
edition: "2015",
features: ["default"],
- flags: [
- "--cfg allow_clippy",
- "--cfg doctests",
- "--cfg maybe_uninit",
- "--cfg tuple_ty",
+ cfgs: [
+ "allow_clippy",
+ "doctests",
+ "maybe_uninit",
+ "raw_ref_macros",
+ "tuple_ty",
],
apex_available: [
"//apex_available:platform",
@@ -45,11 +46,12 @@
auto_gen_config: true,
edition: "2015",
features: ["default"],
- flags: [
- "--cfg allow_clippy",
- "--cfg doctests",
- "--cfg maybe_uninit",
- "--cfg tuple_ty",
+ cfgs: [
+ "allow_clippy",
+ "doctests",
+ "maybe_uninit",
+ "raw_ref_macros",
+ "tuple_ty",
],
rustlibs: [
// ANDROID: disable for now just to avoid another dependency.
diff --git a/cargo2android.json b/cargo2android.json
new file mode 100644
index 0000000..0f253f0
--- /dev/null
+++ b/cargo2android.json
@@ -0,0 +1,11 @@
+{
+ "apex-available": [
+ "//apex_available:platform",
+ "com.android.virt"
+ ],
+ "dependencies": true,
+ "device": true,
+ "patch": "patches/Android.bp.patch",
+ "run": true,
+ "tests": true
+}
\ No newline at end of file
diff --git a/patches/Android.bp.patch b/patches/Android.bp.patch
index 76d4a07..96c3e12 100644
--- a/patches/Android.bp.patch
+++ b/patches/Android.bp.patch
@@ -2,18 +2,7 @@
index eb63f7c..efa8362 100644
--- a/Android.bp
+++ b/Android.bp
-@@ -13,6 +13,10 @@ rust_library {
- "--cfg maybe_uninit",
- "--cfg tuple_ty",
- ],
-+ apex_available: [
-+ "//apex_available:platform",
-+ "com.android.virt",
-+ ],
- }
-
- rust_defaults {
-@@ -30,7 +34,8 @@ rust_defaults {
+@@ -48,7 +52,8 @@ rust_defaults {
"--cfg tuple_ty",
],
rustlibs: [