aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlice Wang <aliceywang@google.com>2023-02-01 13:33:06 +0000
committerAlice Wang <aliceywang@google.com>2023-02-01 13:40:32 +0000
commitf397cc424651f11d666f89e47b6687eeb2733a3f (patch)
treec0b73cba258b2aaa243d3d56792608110cfdf756
parentda0c7cffd4145e61bd4acc9c123a04ba53fd0bdd (diff)
downloadavb-f397cc424651f11d666f89e47b6687eeb2733a3f.tar.gz
Add non debug libavb that silences debug message printing
The non debug libavb will be used in pVM firmware where the UART logging is slow, thus we try to avoid verbose debugging message printing. Bug: 267435997 Test: atest libavb_host_unittest libpvmfw_avb.integration_test Change-Id: Ice76f06191d7a3854080180bdc809828af6a292c
-rw-r--r--Android.bp23
1 files changed, 19 insertions, 4 deletions
diff --git a/Android.bp b/Android.bp
index 4dceabc..8354a88 100644
--- a/Android.bp
+++ b/Android.bp
@@ -148,10 +148,8 @@ python_binary_host {
compile_multilib: "first",
}
-// Build libavb - this is a static library that depends
-// on only libc and libcrypto, but no other dependencies.
-cc_library_static {
- name: "libavb",
+cc_defaults {
+ name: "libavb_defaults",
defaults: [
"avb_defaults",
"avb_sources",
@@ -175,6 +173,23 @@ cc_library_static {
},
}
+// Build libavb - this is a static library that depends
+// on only libc and libcrypto, but no other dependencies.
+cc_library_static {
+ name: "libavb",
+ defaults: ["libavb_defaults"],
+}
+
+// Build libavb_non_debug - this is a static library that depends
+// on only libc and libcrypto, but no other dependencies.
+// The non debug version of the library doesn't print any debug
+// message.
+cc_library_static {
+ name: "libavb_non_debug",
+ defaults: ["libavb_defaults"],
+ cflags: ["-UAVB_ENABLE_DEBUG"],
+}
+
// Build libavb_user for the target - in addition to libavb, it
// includes libavb_ab, libavb_user and also depends on libbase and
// libfs_mgr.