aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Scull <ascull@google.com>2021-11-05 12:26:29 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-11-05 12:26:29 +0000
commit5f619e245c0b5a17492bc1f0abd9de959ea343ff (patch)
treec124335f2d344f91b064904d686f4beee88dc997
parent746b972f4f95208df6f44fe352fe52447c942660 (diff)
parentdad1451a9e04cb2b77d0a235f35394c63c09711c (diff)
downloadopen-dice-5f619e245c0b5a17492bc1f0abd9de959ea343ff.tar.gz
[ANDROID] Add build rules for BCC library, tests and fuzzers am: ecd29a6ec5 am: e5272ff4ce am: 0ff5390fdf am: dad1451a9e
Original change: https://android-review.googlesource.com/c/platform/external/open-dice/+/1880277 Change-Id: Ifcaf990fb3fb7e252322a002f63c3b432d441082
-rw-r--r--Android.bp50
1 files changed, 50 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
index e3fcfb9..8685e43 100644
--- a/Android.bp
+++ b/Android.bp
@@ -43,6 +43,18 @@ cc_library_static {
shared_libs: ["libcrypto"],
}
+cc_library_static {
+ name: "libopen_dice_bcc",
+ host_supported: true,
+ srcs: [
+ "src/cbor_reader.c",
+ "src/android/bcc.c",
+ ],
+ static_libs: ["libopen_dice_cbor"],
+ export_static_lib_headers: ["libopen_dice_cbor"],
+ shared_libs: ["libcrypto"],
+}
+
cc_test {
name: "libopen_dice_test",
host_supported: true,
@@ -68,6 +80,26 @@ cc_test {
static_libs: ["libopen_dice_cbor"],
}
+cc_test {
+ name: "libopen_dice_cbor_reader_test",
+ host_supported: true,
+ cflags: ["-DDICE_USE_GTEST"],
+ srcs: ["src/cbor_reader_test.cc"],
+ static_libs: ["libopen_dice_bcc"],
+}
+
+cc_test {
+ name: "libopen_dice_bcc_test",
+ host_supported: true,
+ cflags: ["-DDICE_USE_GTEST"],
+ srcs: ["src/android/bcc_test.cc"],
+ static_libs: [
+ "libopen_dice_bcc",
+ "libopen_dice_cbor",
+ ],
+ shared_libs: ["libcrypto"],
+}
+
// TODO: cbor_cert_op_test after resolving COSE dependency
cc_fuzz {
@@ -78,9 +110,27 @@ cc_fuzz {
}
cc_fuzz {
+ name: "libopen_dice_cbor_reader_fuzzer",
+ host_supported: true,
+ srcs: ["src/cbor_reader_fuzzer.cc"],
+ static_libs: ["libopen_dice_bcc"],
+}
+
+cc_fuzz {
name: "libopen_dice_cbor_fuzzer",
host_supported: true,
srcs: ["src/fuzzer.cc"],
static_libs: ["libopen_dice_cbor"],
shared_libs: ["libcrypto"],
}
+
+cc_fuzz {
+ name: "libopen_dice_bcc_fuzzer",
+ host_supported: true,
+ srcs: ["src/android/bcc_fuzzer.cc"],
+ static_libs: [
+ "libopen_dice_bcc",
+ "libopen_dice_cbor",
+ ],
+ shared_libs: ["libcrypto"],
+}