Use add-module-block to preserve changes to Android.bp.
This section was added in https://r.android.com/2717613 without updating
cargo2android.json, so it would be lost.
Bug: 275290559
Test: Ran cargo2android.py
Change-Id: I22cde5278442b57b750812c69f58ff093d674a96
diff --git a/Android.bp b/Android.bp
index 81c9175..b6b435b 100644
--- a/Android.bp
+++ b/Android.bp
@@ -71,7 +71,7 @@
"liblog",
],
}
- }
+ },
}
rust_library_rlib {
diff --git a/android_impl.bp b/android_impl.bp
new file mode 100644
index 0000000..77d8833
--- /dev/null
+++ b/android_impl.bp
@@ -0,0 +1,12 @@
+target: {
+ android: {
+ cfgs: ["default_log_impl"],
+ rustlibs: [
+ "libandroid_log_sys",
+ "libonce_cell",
+ ],
+ shared_libs: [
+ "liblog",
+ ],
+ }
+}
\ No newline at end of file
diff --git a/cargo2android.json b/cargo2android.json
index 474419b..2e29872 100644
--- a/cargo2android.json
+++ b/cargo2android.json
@@ -6,7 +6,8 @@
"variants": [
{
"features": "std",
- "suffix": "_rust"
+ "suffix": "_rust",
+ "add-module-block": "android_impl.bp"
},
{
"force-rlib": true,