• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1package {
2    default_applicable_licenses: ["external_libvpx_license"],
3}
4
5// Added automatically by a large-scale-change that took the approach of
6// 'apply every license found to every target'. While this makes sure we respect
7// every license restriction, it may not be entirely correct.
8//
9// e.g. GPL in an MIT project might only apply to the contrib/ directory.
10//
11// Please consider splitting the single license below into multiple licenses,
12// taking care not to lose any license_kind information, and overriding the
13// default license using the 'licenses: [...]' property on targets as needed.
14//
15// For unused files, consider creating a 'fileGroup' with "//visibility:private"
16// to attach the license to, and including a comment whether the files may be
17// used in the current project.
18// See: http://go/android-license-faq
19license {
20    name: "external_libvpx_license",
21    visibility: [":__subpackages__"],
22    license_kinds: [
23        "SPDX-license-identifier-BSD",
24        "SPDX-license-identifier-ISC",
25        "legacy_unencumbered",
26    ],
27    license_text: [
28        "NOTICE",
29    ],
30}
31
32cc_library {
33    name: "libvpx",
34    vendor_available: true,
35    host_supported: true,
36    version_script: "exports.lds",
37
38    target: {
39        darwin: {
40            enabled: false,
41        },
42        android: {
43            sanitize: {
44                cfi: true,
45                config: {
46                    cfi_assembly_support: true,
47                },
48            },
49        },
50    },
51
52    arch: {
53        // configured to require the neon unit
54        arm: {
55            neon: {
56                // Want arm, not thumb, optimized
57                instruction_set: "arm",
58
59                srcs: libvpx_arm_neon_c_srcs + libvpx_arm_neon_asm_srcs,
60                local_include_dirs: ["config/arm-neon"],
61            },
62        },
63
64        arm64: {
65            srcs: libvpx_arm64_c_srcs,
66            local_include_dirs: ["config/arm64"],
67        },
68
69        x86: {
70            srcs: libvpx_x86_c_srcs + libvpx_x86_asm_srcs,
71            local_include_dirs: ["config/x86"],
72            cflags: [
73                "-mssse3",
74            ],
75        },
76
77        x86_64: {
78            srcs: libvpx_x86_64_c_srcs + libvpx_x86_64_asm_srcs,
79            local_include_dirs: ["config/x86_64"],
80            cflags: [
81                "-mssse3",
82            ],
83        },
84    },
85
86    cflags: [
87        "-O3",
88        "-Wno-unused-parameter",
89    ],
90
91    export_include_dirs: ["libvpx"],
92
93    sanitize: {
94        integer_overflow: true,
95        misc_undefined: ["bounds"],
96        blocklist: "libvpx_blocklist.txt",
97    },
98    min_sdk_version: "29",
99    apex_available: [
100        "//apex_available:platform",
101        "com.android.media.swcodec",
102    ],
103}
104
105cc_fuzz {
106    name: "vp9_dec_fuzzer",
107    host_supported: true,
108    srcs: [
109        "libvpx/examples/vpx_dec_fuzzer.cc",
110    ],
111    target: {
112        darwin: {
113            enabled: false,
114        },
115    },
116    arch: {
117        arm: {
118            neon: {
119                local_include_dirs: ["config/arm-neon"],
120            },
121        },
122
123        arm64: {
124            local_include_dirs: ["config/arm64"],
125        },
126
127        x86: {
128            local_include_dirs: ["config/x86"],
129        },
130
131        x86_64: {
132            local_include_dirs: ["config/x86_64"],
133        },
134    },
135    cflags: ["-DDECODER=vp9"],
136    static_libs: [
137        "libvpx",
138    ],
139}
140
141cc_fuzz {
142    name: "vp8_dec_fuzzer",
143    host_supported: true,
144    srcs: [
145        "libvpx/examples/vpx_dec_fuzzer.cc",
146    ],
147    target: {
148        darwin: {
149            enabled: false,
150        },
151    },
152    arch: {
153        arm: {
154            neon: {
155                local_include_dirs: ["config/arm-neon"],
156            },
157        },
158
159        arm64: {
160            local_include_dirs: ["config/arm64"],
161        },
162
163        x86: {
164            local_include_dirs: ["config/x86"],
165        },
166
167        x86_64: {
168            local_include_dirs: ["config/x86_64"],
169        },
170    },
171
172    cflags: ["-DDECODER=vp8"],
173    static_libs: [
174        "libvpx",
175    ],
176}
177