| package { |
| // See: http://go/android-license-faq |
| // A large-scale-change added 'default_applicable_licenses' to import |
| // all of the 'license_kinds' from "external_flac_license" |
| // to get the below license kinds: |
| // SPDX-license-identifier-BSD |
| // legacy_unencumbered |
| default_applicable_licenses: ["external_flac_license"], |
| } |
| |
| cc_library_static { |
| name: "libFLAC", |
| vendor_available: true, |
| host_supported: true, |
| srcs: [ |
| "bitmath.c", |
| "bitreader.c", |
| "bitwriter.c", |
| "cpu.c", |
| "crc.c", |
| "fixed.c", |
| "float.c", |
| "format.c", |
| "lpc.c", |
| "memory.c", |
| "md5.c", |
| "stream_decoder.c", |
| "stream_encoder.c", |
| "stream_encoder_framing.c", |
| "window.c", |
| ], |
| |
| local_include_dirs: ["include"], |
| header_libs: [ |
| "libFLAC-config", |
| "libFLAC-headers", |
| ], |
| export_header_lib_headers: ["libFLAC-headers"], |
| |
| cflags: [ |
| "-DHAVE_CONFIG_H", |
| "-DFLAC__NO_MD5", |
| "-DFLAC__INTEGER_ONLY_LIBRARY", |
| |
| "-D_REENTRANT", |
| "-DPIC", |
| "-DU_COMMON_IMPLEMENTATION", |
| "-fPIC", |
| |
| "-O3", |
| "-funroll-loops", |
| "-finline-functions", |
| "-Werror", |
| "-Wno-unused-parameter", |
| "-Wno-unreachable-code-loop-increment", |
| ], |
| |
| arch: { |
| arm: { |
| instruction_set: "arm", |
| }, |
| }, |
| |
| sanitize: { |
| integer_overflow: true, |
| misc_undefined: ["bounds"], |
| // Enable CFI if this is used as a shared library |
| // cfi: true, |
| blocklist: "libFLAC_blocklist.txt", |
| }, |
| |
| target: { |
| darwin: { |
| enabled: false, |
| }, |
| }, |
| min_sdk_version: "29", |
| apex_available: [ |
| "//apex_available:platform", |
| "com.android.media", |
| "com.android.media.swcodec", |
| "test_com.android.media.swcodec", |
| ], |
| |
| } |