1package { 2 // See: http://go/android-license-faq 3 // A large-scale-change added 'default_applicable_licenses' to import 4 // all of the 'license_kinds' from "external_flac_license" 5 // to get the below license kinds: 6 // SPDX-license-identifier-BSD 7 // legacy_unencumbered 8 default_applicable_licenses: ["external_flac_license"], 9} 10 11cc_library_static { 12 name: "libFLAC", 13 vendor_available: true, 14 host_supported: true, 15 srcs: [ 16 "bitmath.c", 17 "bitreader.c", 18 "bitwriter.c", 19 "cpu.c", 20 "crc.c", 21 "fixed.c", 22 "float.c", 23 "format.c", 24 "lpc.c", 25 "memory.c", 26 "md5.c", 27 "stream_decoder.c", 28 "stream_encoder.c", 29 "stream_encoder_framing.c", 30 "window.c", 31 ], 32 33 local_include_dirs: ["include"], 34 header_libs: [ 35 "libFLAC-config", 36 "libFLAC-headers", 37 ], 38 export_header_lib_headers: ["libFLAC-headers"], 39 40 cflags: [ 41 "-DHAVE_CONFIG_H", 42 "-DFLAC__NO_MD5", 43 "-DFLAC__INTEGER_ONLY_LIBRARY", 44 45 "-D_REENTRANT", 46 "-DPIC", 47 "-DU_COMMON_IMPLEMENTATION", 48 "-fPIC", 49 50 "-O3", 51 "-funroll-loops", 52 "-finline-functions", 53 "-Werror", 54 "-Wno-unused-parameter", 55 "-Wno-unreachable-code-loop-increment", 56 ], 57 58 arch: { 59 arm: { 60 instruction_set: "arm", 61 }, 62 }, 63 64 sanitize: { 65 integer_overflow: true, 66 misc_undefined: ["bounds"], 67 // Enable CFI if this is used as a shared library 68 // cfi: true, 69 blocklist: "libFLAC_blocklist.txt", 70 }, 71 72 target: { 73 darwin: { 74 enabled: false, 75 }, 76 }, 77 min_sdk_version: "29", 78} 79