diff options
author | Pierre-Clément Tosi <ptosi@google.com> | 2023-02-16 15:47:10 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-02-16 15:47:10 +0000 |
commit | b81c0b2182daef6fbcbd33d5cf7d9045d697b939 (patch) | |
tree | c74c991790ea2b7ca6707ac8851cbe523a42dd0e | |
parent | 36fcd979487be062bd63c6217af9f2a3e1ac796f (diff) | |
parent | d8e7396d55cfd62ab7bf272453ab493c99988f35 (diff) | |
download | avb-b81c0b2182daef6fbcbd33d5cf7d9045d697b939.tar.gz |
libavb: Introduce baremetal variant of the library am: 10d755b758 am: b5591fb176 am: d8e7396d55
Original change: https://android-review.googlesource.com/c/platform/external/avb/+/2430712
Change-Id: Ice5d40d90f1dadadccfe23bd996110885d848761
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | Android.bp | 44 |
1 files changed, 25 insertions, 19 deletions
@@ -114,9 +114,6 @@ cc_defaults { local_include_dirs: [ "libavb/boringssl", ], - shared_libs: [ - "libcrypto", - ], } cc_defaults { @@ -155,14 +152,24 @@ cc_defaults { "avb_sources", "avb_crypto_ops_impl_boringssl", ], + 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, - header_libs: [ - "avb_headers", + shared_libs: [ + "libcrypto", ], - export_header_lib_headers: ["avb_headers"], target: { linux: { srcs: ["libavb/avb_sysdeps_posix.c"], @@ -173,21 +180,17 @@ cc_defaults { }, } -// 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. +// 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_non_debug", + 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 @@ -205,7 +208,10 @@ cc_library_static { "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", |