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 "frameworks_av_license"
5    // to get the below license kinds:
6    //   SPDX-license-identifier-Apache-2.0
7    default_applicable_licenses: ["frameworks_av_license"],
8}
9
10cc_library_headers {
11    name: "libcodec2_headers",
12    vendor_available: true,
13    min_sdk_version: "29",
14    apex_available: [
15        "//apex_available:platform",
16        "com.android.media.swcodec",
17    ],
18    export_include_dirs: ["include"],
19}
20
21cc_library {
22    name: "libcodec2",
23    vendor_available: true,
24    min_sdk_version: "29",
25    apex_available: [
26        "//apex_available:platform",
27        "com.android.media.swcodec",
28    ],
29    double_loadable: true,
30
31    srcs: ["C2.cpp"],
32
33    cflags: [
34        "-Wall",
35        "-Werror",
36    ],
37
38    header_abi_checker: {
39        check_all_apis: true,
40    },
41
42    header_libs: [
43        "libcodec2_headers",
44        "libhardware_headers",
45        "libutils_headers",
46        "media_plugin_headers",
47    ],
48
49    export_header_lib_headers: [
50        "libcodec2_headers",
51        "libhardware_headers",
52        "libutils_headers",
53        "media_plugin_headers",
54    ],
55
56    sanitize: {
57        misc_undefined: [
58            "unsigned-integer-overflow",
59            "signed-integer-overflow",
60        ],
61        cfi: false, // true,
62        diag: {
63            cfi: false, // true,
64        },
65    },
66
67    ldflags: ["-Wl,-Bsymbolic"],
68}
69