aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernie Innocenti <codewiz@google.com>2020-12-16 14:04:09 +0900
committerBernie Innocenti <codewiz@google.com>2020-12-16 14:04:09 +0900
commit55399b5e6d1c777dec74a2d6c8479f3e2877caf8 (patch)
tree5e6851eb815d5b844b45594f9043cb88dac480a8
parente9e19d5ddf871ca911fa0177df3f2c22b5b022f6 (diff)
downloadquiche-55399b5e6d1c777dec74a2d6c8479f3e2877caf8.tar.gz
Build quiche both as an rlib and as an ffi lib.platform-tools-31.0.0
This is needed to build the DoH engine directly in Rust (as opposed to using the C API). Test: N/A Bug: 155855709 Change-Id: I081574d05ca67affa88b7adbc7e8c6c054a2edd9
-rw-r--r--Android.bp14
-rw-r--r--patches/Android.bp.patch20
2 files changed, 27 insertions, 7 deletions
diff --git a/Android.bp b/Android.bp
index 30f962d..f828c7d 100644
--- a/Android.bp
+++ b/Android.bp
@@ -10,8 +10,8 @@ cc_library_headers {
min_sdk_version: "29",
}
-rust_ffi {
- name: "libquiche_ffi",
+rust_defaults {
+ name: "libquiche_defaults",
stem: "libquiche",
host_supported: true,
crate_name: "quiche",
@@ -45,6 +45,16 @@ rust_ffi {
min_sdk_version: "29",
}
+rust_ffi {
+ name: "libquiche_ffi",
+ defaults: ["libquiche_defaults"],
+}
+
+rust_library {
+ name: "libquiche",
+ defaults: ["libquiche_defaults"],
+}
+
// dependent_library ["feature_list"]
// cc-1.0.66
// cfg-if-0.1.10
diff --git a/patches/Android.bp.patch b/patches/Android.bp.patch
index 28dd4c8..5a4dc0d 100644
--- a/patches/Android.bp.patch
+++ b/patches/Android.bp.patch
@@ -1,6 +1,6 @@
---- Android.bp 2020-12-14 20:39:12.756511927 +0900
-+++ Android.bp.new 2020-12-14 20:27:28.268899533 +0900
-@@ -1,74 +1,48 @@
+--- Android.bp 2020-12-16 14:02:37.120186423 +0900
++++ Android.bp.new 2020-12-15 22:43:09.717301330 +0900
+@@ -1,74 +1,58 @@
// This file is generated by cargo2android.py --run --device --dependencies --patch=patches/Android.bp.patch.
-rust_library_shared {
@@ -36,8 +36,8 @@
-rust_library {
- name: "libquiche",
-+rust_ffi {
-+ name: "libquiche_ffi",
++rust_defaults {
++ name: "libquiche_defaults",
+ stem: "libquiche",
host_supported: true,
crate_name: "quiche",
@@ -94,6 +94,16 @@
+ "com.android.resolv",
],
+ min_sdk_version: "29",
++}
++
++rust_ffi {
++ name: "libquiche_ffi",
++ defaults: ["libquiche_defaults"],
++}
++
++rust_library {
++ name: "libquiche",
++ defaults: ["libquiche_defaults"],
}
// dependent_library ["feature_list"]