aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Galenson <jgalenson@google.com>2021-04-27 13:38:35 -0700
committerJoel Galenson <jgalenson@google.com>2021-04-27 13:38:49 -0700
commit47e66dd5000ef6abc0180bca22aec94d30c39cfb (patch)
tree8cab78e20c4344228f35b5aa8a47039926a4f317
parent82a8538d28143be6a4153bbf68b7b078c9374bd0 (diff)
downloadintrusive-collections-47e66dd5000ef6abc0180bca22aec94d30c39cfb.tar.gz
Generate apex_available from c2a instead of a patchandroid-s-beta-2android-s-beta-1
Test: Run c2a Test: Build Change-Id: I5c5b4ee0b8535f9f5846eb4141fe81a637e80250
-rw-r--r--Android.bp4
-rw-r--r--cargo2android.json10
-rw-r--r--patches/Android.bp.patch20
3 files changed, 18 insertions, 16 deletions
diff --git a/Android.bp b/Android.bp
index 2123977..ac11512 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,4 +1,5 @@
-// This file is generated by cargo2android.py --run --device --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.
// TODO(victorhsieh): Add --test. The test in the current version depends on an older rand crate
// (pre 0.8) to compile due to several API changes. However, Android's rand is already newer.
@@ -42,6 +43,7 @@ license {
rust_library {
name: "libintrusive_collections",
+ // has rustc warnings
host_supported: true,
crate_name: "intrusive_collections",
srcs: ["src/lib.rs"],
diff --git a/cargo2android.json b/cargo2android.json
new file mode 100644
index 0000000..623aa56
--- /dev/null
+++ b/cargo2android.json
@@ -0,0 +1,10 @@
+{
+ "apex-available": [
+ "//apex_available:platform",
+ "com.android.virt"
+ ],
+ "dependencies": true,
+ "device": true,
+ "patch": "patches/Android.bp.patch",
+ "run": true
+} \ No newline at end of file
diff --git a/patches/Android.bp.patch b/patches/Android.bp.patch
index 15d6516..f0c7569 100644
--- a/patches/Android.bp.patch
+++ b/patches/Android.bp.patch
@@ -2,21 +2,11 @@ diff --git a/Android.bp b/Android.bp
index 9e3c084..d4334b6 100644
--- a/Android.bp
+++ b/Android.bp
-@@ -1,4 +1,6 @@
- // This file is generated by cargo2android.py --run --device --dependencies --patch=patches/Android.bp.patch.
+@@ -1,5 +1,7 @@
+ // This file is generated by cargo2android.py --config cargo2android.json.
+ // Do not modify this file as changes will be overridden on upgrade.
+// TODO(victorhsieh): Add --test. The test in the current version depends on an older rand crate
+// (pre 0.8) to compile due to several API changes. However, Android's rand is already newer.
- rust_library {
- name: "libintrusive_collections",
-@@ -13,6 +15,10 @@ rust_library {
- rustlibs: [
- "libmemoffset",
- ],
-+ apex_available: [
-+ "//apex_available:platform",
-+ "com.android.virt",
-+ ],
- }
-
- // dependent_library ["feature_list"]
+ package {
+ default_applicable_licenses: [