aboutsummaryrefslogtreecommitdiff
path: root/patches/Android.bp.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/Android.bp.patch')
-rw-r--r--patches/Android.bp.patch89
1 files changed, 89 insertions, 0 deletions
diff --git a/patches/Android.bp.patch b/patches/Android.bp.patch
new file mode 100644
index 0000000..0fc5a78
--- /dev/null
+++ b/patches/Android.bp.patch
@@ -0,0 +1,89 @@
+--- 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 @@
+ // 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: [
+- "boringssl-vendored",
++ "boringssl",
+ "default",
+ ],
+- rustlibs: [
+- "liblazy_static",
+- "liblibc",
+- "liblibm",
+- "liblog_rust",
+- "libring",
+- ],
+- static_libs: [
+- "libcrypto",
+- "libssl",
+- ],
+-}
+
+-rust_library {
+- name: "libquiche",
+- host_supported: true,
+- crate_name: "quiche",
+- srcs: ["src/lib.rs"],
+- edition: "2018",
+- features: [
+- "boringssl-vendored",
+- "default",
+- ],
+- rustlibs: [
++ // Link all crates statically to create a self-contained .so library.
++ rlibs: [
+ "liblazy_static",
+ "liblibc",
+ "liblibm",
+ "liblog_rust",
+ "libring",
+ ],
+- static_libs: [
++ prefer_rlib: true,
++
++ shared_libs: [
+ "libcrypto",
+ "libssl",
+ ],
+-}
+
+-rust_library_static {
+- name: "libquiche_static",
+- stem: "libquiche",
+- host_supported: true,
+- crate_name: "quiche",
+- srcs: ["src/lib.rs"],
+- edition: "2018",
+- features: [
+- "boringssl-vendored",
+- "default",
+- ],
+- rustlibs: [
+- "liblazy_static",
+- "liblibc",
+- "liblibm",
+- "liblog_rust",
+- "libring",
+- ],
+- static_libs: [
+- "libcrypto",
+- "libssl",
++ // For DnsResolver (Mainline module introduced in Q).
++ min_sdk_version: "29",
++ apex_available: [
++ "//apex_available:platform",
++ "com.android.resolv",
+ ],
+ }
+