diff options
author | William Escande <wescande@google.com> | 2022-04-28 11:53:12 -0700 |
---|---|---|
committer | William Escande <wescande@google.com> | 2022-05-06 17:46:59 +0000 |
commit | debb970fb718446b52efc6f2dbcdc46718273730 (patch) | |
tree | 18e954fc90009b3a60d4d5184273b34397ccc2df | |
parent | 198b34618d007a61fd8b001c4cb316a59370c61a (diff) | |
download | libldac-debb970fb718446b52efc6f2dbcdc46718273730.tar.gz |
Statically link ldac into module
If we statically link ldac, we enforce at build time the "api" are still
the same. We also enforce the current module version was tested against
a known ldac encoder and we do not have to deal with version mismatched
Bug: 226572369
Test: Build + boot + Not yet tested
Tag: #refactor
Ignore-AOSP-First: Apex only on TM
Merged-In: Ib0223f833e3842240bb801013f99963b6c44b48a
Change-Id: Ib0223f833e3842240bb801013f99963b6c44b48a
-rw-r--r-- | Android.bp | 30 | ||||
-rw-r--r-- | METADATA | 6 | ||||
-rw-r--r-- | fuzzer/Android.bp | 2 |
3 files changed, 33 insertions, 5 deletions
@@ -21,13 +21,14 @@ license { ], } -cc_library_shared { +cc_library { name: "libldacBT_enc", vendor_available: true, product_available: true, vndk: { enabled: true, }, + host_supported: true, arch: { arm: { instruction_set: "arm", @@ -41,15 +42,27 @@ cc_library_shared { // -D_32BIT_FIXED_POINT should be added to cflags for devices without a FPU // unit such as ARM Cortex-R series or external 32-bit DSPs. cflags: ["-O2", "-Werror", "-Wall", "-Wextra"], + min_sdk_version: "Tiramisu", + apex_available: [ + "//apex_available:platform", + "com.android.bluetooth", + ], + visibility: [ + "//external/libldac/fuzzer", + "//external/oss-fuzz", + "//packages/modules/Bluetooth:__subpackages__", + "//packages/modules/vndk/apex", + ], } -cc_library_shared { +cc_library { name: "libldacBT_abr", vendor_available: true, product_available: true, vndk: { enabled: true, }, + host_supported: true, arch: { arm: { instruction_set: "arm", @@ -57,6 +70,15 @@ cc_library_shared { }, export_include_dirs: ["abr/inc"], srcs: ["abr/src/ldacBT_abr.c"], - shared_libs: ["libldacBT_enc"], - cflags: ["-O2", "-Werror", "-Wall", "-Wextra"] + static_libs: ["libldacBT_enc"], + cflags: ["-O2", "-Werror", "-Wall", "-Wextra"], + min_sdk_version: "Tiramisu", + apex_available: [ + "//apex_available:platform", + "com.android.bluetooth", + ], + visibility: [ + "//packages/modules/Bluetooth:__subpackages__", + "//packages/modules/vndk/apex", + ], } @@ -1,3 +1,9 @@ +name: "ldac" +description: "LDAC is a bluetooth codec of Hi-Res Audio Wireless. AOSP is the upstream version" third_party { + url { + type: HOMEPAGE + value: "https://www.sony.net/Products/LDAC/" + } license_type: NOTICE } diff --git a/fuzzer/Android.bp b/fuzzer/Android.bp index 1d2620f..01f586d 100644 --- a/fuzzer/Android.bp +++ b/fuzzer/Android.bp @@ -18,7 +18,7 @@ package { cc_fuzz { name: "libldac-encode_fuzzer", - shared_libs: ["libldacBT_enc"], + static_libs: ["libldacBT_enc"], srcs: ["libldac_encode_fuzzer.cc"], fuzz_config: { componentid: 27441 |