aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Huang <huangluke@google.com>2021-04-25 17:56:28 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-04-25 17:56:28 +0000
commit98c1238c14a64a768b5b65e9908156bc7db45cd1 (patch)
tree8c71789fa43e6ad6912b85abf14a613aca887bd8
parent5a98f4b4c851355037ec5c14403caf324847a82d (diff)
parent6f6495cec719acd00e44304ed1037dab504579f1 (diff)
downloadquiche-98c1238c14a64a768b5b65e9908156bc7db45cd1.tar.gz
Statically link libcrypto and libssl to quiche unit test am: 9d6d0b4d89 am: 4df93efda5 am: 9b241e9669 am: 6f6495cec7
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/quiche/+/1684346 Change-Id: I362d04dcddaa33959bdcdb52448f7173ed591890
-rw-r--r--Android.bp14
-rw-r--r--patches/Android.bp.patch40
2 files changed, 41 insertions, 13 deletions
diff --git a/Android.bp b/Android.bp
index 1fa222d..981eb96 100644
--- a/Android.bp
+++ b/Android.bp
@@ -104,10 +104,6 @@ rust_defaults {
"libring",
"liburl",
],
- shared_libs: [
- "libcrypto",
- "libssl",
- ],
data: [
"examples/cert.crt",
"examples/cert.key",
@@ -122,11 +118,21 @@ rust_test_host {
test_options: {
unit_test: true,
},
+ shared_libs: [
+ "libcrypto",
+ "libssl",
+ ],
}
rust_test {
name: "quiche_device_test_src_lib",
defaults: ["quiche_defaults"],
+ // To run this test in R platform, it's required to statically link
+ // libcrypto and libssl.
+ static_libs: [
+ "libcrypto_static",
+ "libssl",
+ ],
}
// dependent_library ["feature_list"]
diff --git a/patches/Android.bp.patch b/patches/Android.bp.patch
index a4db82e..98cd60a 100644
--- a/patches/Android.bp.patch
+++ b/patches/Android.bp.patch
@@ -1,9 +1,10 @@
diff --git a/Android.bp b/Android.bp
-index a3f7464..d398440 100644
+index 130d4f3..981eb96 100644
--- a/Android.bp
+++ b/Android.bp
-@@ -1,74 +1,55 @@
- // This file is generated by cargo2android.py --run --device --dependencies --tests --patch=patches/Android.bp.patch.
+@@ -32,75 +32,56 @@ license {
+ ],
+ }
-rust_ffi_shared {
- name: "libquiche_shared",
@@ -106,7 +107,7 @@ index a3f7464..d398440 100644
}
rust_defaults {
-@@ -79,7 +60,7 @@ rust_defaults {
+@@ -111,7 +92,7 @@ rust_defaults {
auto_gen_config: true,
edition: "2018",
features: [
@@ -115,15 +116,14 @@ index a3f7464..d398440 100644
"default",
],
rustlibs: [
-@@ -91,10 +72,16 @@ rust_defaults {
+@@ -123,10 +104,12 @@ rust_defaults {
"libring",
"liburl",
],
- static_libs: [
-+ shared_libs: [
- "libcrypto",
- "libssl",
- ],
+- "libcrypto",
+- "libssl",
+- ],
+ data: [
+ "examples/cert.crt",
+ "examples/cert.key",
@@ -133,3 +133,25 @@ index a3f7464..d398440 100644
}
rust_test_host {
+@@ -135,11 +118,21 @@ rust_test_host {
+ test_options: {
+ unit_test: true,
+ },
++ shared_libs: [
++ "libcrypto",
++ "libssl",
++ ],
+ }
+
+ rust_test {
+ name: "quiche_device_test_src_lib",
+ defaults: ["quiche_defaults"],
++ // To run this test in R platform, it's required to statically link
++ // libcrypto and libssl.
++ static_libs: [
++ "libcrypto_static",
++ "libssl",
++ ],
+ }
+
+ // dependent_library ["feature_list"]