diff options
author | Pierre-Clément Tosi <ptosi@google.com> | 2023-02-01 13:07:01 +0000 |
---|---|---|
committer | Pierre-Clément Tosi <ptosi@google.com> | 2023-02-13 22:07:04 +0000 |
commit | 10d755b758bb356055338fdd2fa39ff0a88c9f05 (patch) | |
tree | c74c991790ea2b7ca6707ac8851cbe523a42dd0e | |
parent | f397cc424651f11d666f89e47b6687eeb2733a3f (diff) | |
download | avb-10d755b758bb356055338fdd2fa39ff0a88c9f05.tar.gz |
libavb: Introduce baremetal variant of the library
Introduce a library intended for baremetal targets that statically link
against libcrypto_baremetal instead of the libcrypto userspace library.
Bug: 267447272
Test: -
Change-Id: I853fb4d2761384dba498fd3547c59703f4a235e5
-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", |