aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Vander Stoep <jeffv@google.com>2020-12-07 17:57:01 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-12-07 17:57:01 +0000
commit446a335f2b74b624766ac4c48d0adedc74a23c4f (patch)
tree35c146bdd1f6066aa551062f92b17f1a6e49aa4c
parent52cc06843befc42abb13d07b7534dacf87b13590 (diff)
parent8e587569c4b97b35d2cecb5fd3fff3bdf6163edf (diff)
downloadquiche-446a335f2b74b624766ac4c48d0adedc74a23c4f.tar.gz
Add Android.bp am: f06dc5df83 am: b92f5a908b am: 8e587569c4
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/quiche/+/1517882 Change-Id: I9591f1e78ff9a5fcc35bde657ae58a0c81f35a9b
-rw-r--r--Android.bp39
-rw-r--r--patches/env.diff16
-rw-r--r--src/ffi.rs5
3 files changed, 59 insertions, 1 deletions
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..9e84e00
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,39 @@
+// This file is generated by cargo2android.py --run --device --dependencies.
+
+
+rust_library {
+ name: "libquiche",
+ host_supported: true,
+ crate_name: "quiche",
+ srcs: ["src/lib.rs"],
+ edition: "2018",
+ features: [
+ "boringssl",
+ "default",
+ ],
+ rustlibs: [
+ "liblazy_static",
+ "liblibc",
+ "liblibm",
+ "liblog_rust",
+ "libring",
+ ],
+ shared_libs: [
+ "libcrypto",
+ "libssl",
+ ],
+}
+
+
+// dependent_library ["feature_list"]
+// cc-1.0.65
+// cfg-if-0.1.10
+// cmake-0.1.45
+// lazy_static-1.4.0
+// libc-0.2.80 "default,std"
+// libm-0.2.1 "default"
+// log-0.4.11 "std"
+// once_cell-1.5.2 "alloc,std"
+// ring-0.16.17 "alloc,default,dev_urandom_fallback,once_cell"
+// spin-0.5.2
+// untrusted-0.7.1
diff --git a/patches/env.diff b/patches/env.diff
new file mode 100644
index 0000000..39629cf
--- /dev/null
+++ b/patches/env.diff
@@ -0,0 +1,16 @@
+diff --git a/src/ffi.rs b/src/ffi.rs
+index 13d98cd..39564dc 100644
+--- a/src/ffi.rs
++++ b/src/ffi.rs
+@@ -42,7 +42,10 @@ use crate::*;
+
+ #[no_mangle]
+ pub extern fn quiche_version() -> *const u8 {
+- static VERSION: &str = concat!(env!("CARGO_PKG_VERSION"), "\0");
++ //static VERSION: &str = concat!(env!("CARGO_PKG_VERSION"), "\0");
++ // ANDROID's build system doesn't support environment variables
++ // so we hardcode the package version here.
++ static VERSION: &str = concat!("0.6.0", "\0");
+ VERSION.as_ptr()
+ }
+
diff --git a/src/ffi.rs b/src/ffi.rs
index 13d98cd..39564dc 100644
--- a/src/ffi.rs
+++ b/src/ffi.rs
@@ -42,7 +42,10 @@ use crate::*;
#[no_mangle]
pub extern fn quiche_version() -> *const u8 {
- static VERSION: &str = concat!(env!("CARGO_PKG_VERSION"), "\0");
+ //static VERSION: &str = concat!(env!("CARGO_PKG_VERSION"), "\0");
+ // ANDROID's build system doesn't support environment variables
+ // so we hardcode the package version here.
+ static VERSION: &str = concat!("0.6.0", "\0");
VERSION.as_ptr()
}