Snap for 9710098 from b81c0b2182daef6fbcbd33d5cf7d9045d697b939 to mainline-tzdata5-release
Change-Id: I86ac0056ec24e180db12254aef3b91ddc5c78a1f
diff --git a/Android.bp b/Android.bp
index 4dceabc..b4660f8 100644
--- a/Android.bp
+++ b/Android.bp
@@ -114,9 +114,6 @@
local_include_dirs: [
"libavb/boringssl",
],
- shared_libs: [
- "libcrypto",
- ],
}
cc_defaults {
@@ -148,23 +145,31 @@
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",
"avb_crypto_ops_impl_boringssl",
],
- host_supported: true,
- ramdisk_available: true,
- vendor_ramdisk_available: true,
- recovery_available: true,
header_libs: [
"avb_headers",
],
export_header_lib_headers: ["avb_headers"],
+}
+
+// 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"],
+ host_supported: true,
+ ramdisk_available: true,
+ vendor_ramdisk_available: true,
+ recovery_available: true,
+ shared_libs: [
+ "libcrypto",
+ ],
target: {
linux: {
srcs: ["libavb/avb_sysdeps_posix.c"],
@@ -175,6 +180,19 @@
},
}
+// A variant of the library that can run in baremetal environments.
+//
+// The debug feature isn't enabled, removing verbose logging and assertions.
+cc_library_static {
+ name: "libavb_baremetal",
+ defaults: ["libavb_defaults"],
+ cflags: ["-UAVB_ENABLE_DEBUG"],
+ static_libs: [
+ "libcrypto_baremetal",
+ ],
+ srcs: ["libavb/avb_sysdeps_posix.c"],
+}
+
// Build libavb_user for the target - in addition to libavb, it
// includes libavb_ab, libavb_user and also depends on libbase and
// libfs_mgr.
@@ -190,7 +208,10 @@
"avb_headers",
],
export_header_lib_headers: ["avb_headers"],
- shared_libs: ["libbase"],
+ shared_libs: [
+ "libbase",
+ "libcrypto",
+ ],
static_libs: ["libfs_mgr"],
cflags: [
"-DAVB_AB_I_UNDERSTAND_LIBAVB_AB_IS_DEPRECATED",