aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernie Innocenti <codewiz@google.com>2020-12-10 00:05:34 +0900
committerBernie Innocenti <codewiz@google.com>2020-12-14 20:39:38 +0900
commite9e19d5ddf871ca911fa0177df3f2c22b5b022f6 (patch)
treeaba8d7a614da287ada62f5302ad3af98cc7f7e8d
parentead1814d81f3c31214ddbfb60b2d3f177e2e28cd (diff)
downloadquiche-e9e19d5ddf871ca911fa0177df3f2c22b5b022f6.tar.gz
Add header library for libquiche_ffi
Temporary workaround until rust_ffi implements export_include_dirs. Test: m Change-Id: I4e4592ba982c73161ce2ffb82f973c39b9f1ca2e
-rw-r--r--Android.bp12
-rw-r--r--patches/Android.bp.patch58
2 files changed, 45 insertions, 25 deletions
diff --git a/Android.bp b/Android.bp
index 96101dd..30f962d 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,5 +1,15 @@
// This file is generated by cargo2android.py --run --device --dependencies --patch=patches/Android.bp.patch.
+cc_library_headers {
+ name: "libquiche_ffi_headers",
+ export_include_dirs: ["include"],
+ apex_available: [
+ "//apex_available:platform",
+ "com.android.resolv",
+ ],
+ min_sdk_version: "29",
+}
+
rust_ffi {
name: "libquiche_ffi",
stem: "libquiche",
@@ -28,11 +38,11 @@ rust_ffi {
],
// For DnsResolver (Mainline module introduced in Q).
- min_sdk_version: "29",
apex_available: [
"//apex_available:platform",
"com.android.resolv",
],
+ min_sdk_version: "29",
}
// dependent_library ["feature_list"]
diff --git a/patches/Android.bp.patch b/patches/Android.bp.patch
index 0fc5a78..28dd4c8 100644
--- a/patches/Android.bp.patch
+++ b/patches/Android.bp.patch
@@ -1,22 +1,19 @@
---- Android.bp 2020-12-12 01:46:35.080262701 +0900
-+++ Android.bp.new 2020-12-12 01:44:35.649397815 +0900
-@@ -1,73 +1,37 @@
+--- 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 @@
// This file is generated by cargo2android.py --run --device --dependencies --patch=patches/Android.bp.patch.
-rust_library_shared {
- name: "libquiche_shared",
-+rust_ffi {
-+ name: "libquiche_ffi",
- stem: "libquiche",
- host_supported: true,
- crate_name: "quiche",
- srcs: ["src/lib.rs"],
- edition: "2018",
- features: [
+- stem: "libquiche",
+- host_supported: true,
+- crate_name: "quiche",
+- srcs: ["src/lib.rs"],
+- edition: "2018",
+- features: [
- "boringssl-vendored",
-+ "boringssl",
- "default",
- ],
+- "default",
+- ],
- rustlibs: [
- "liblazy_static",
- "liblibc",
@@ -27,20 +24,32 @@
- static_libs: [
- "libcrypto",
- "libssl",
-- ],
--}
++cc_library_headers {
++ name: "libquiche_ffi_headers",
++ export_include_dirs: ["include"],
++ apex_available: [
++ "//apex_available:platform",
++ "com.android.resolv",
+ ],
++ min_sdk_version: "29",
+ }
-rust_library {
- name: "libquiche",
-- host_supported: true,
-- crate_name: "quiche",
-- srcs: ["src/lib.rs"],
-- edition: "2018",
-- features: [
++rust_ffi {
++ name: "libquiche_ffi",
++ stem: "libquiche",
+ host_supported: true,
+ crate_name: "quiche",
+ srcs: ["src/lib.rs"],
+ edition: "2018",
+ features: [
- "boringssl-vendored",
-- "default",
-- ],
++ "boringssl",
+ "default",
+ ],
- rustlibs: [
++
+ // Link all crates statically to create a self-contained .so library.
+ rlibs: [
"liblazy_static",
@@ -80,10 +89,11 @@
- "libcrypto",
- "libssl",
+ // For DnsResolver (Mainline module introduced in Q).
-+ min_sdk_version: "29",
+ apex_available: [
+ "//apex_available:platform",
+ "com.android.resolv",
],
++ min_sdk_version: "29",
}
+ // dependent_library ["feature_list"]