Bob Badour | f39d419 | 2021-02-12 16:36:26 -0800 | [diff] [blame] | 1 | package { |
| 2 | default_applicable_licenses: ["external_libsrtp2_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 |
| 19 | license { |
| 20 | name: "external_libsrtp2_license", |
| 21 | visibility: [":__subpackages__"], |
| 22 | license_kinds: [ |
| 23 | "SPDX-license-identifier-BSD", |
| 24 | "SPDX-license-identifier-MIT", |
| 25 | "legacy_unencumbered", |
| 26 | ], |
| 27 | license_text: [ |
| 28 | "LICENSE", |
| 29 | ], |
| 30 | } |
| 31 | |
Andreas Huber | c5a5f74 | 2019-09-16 14:22:23 -0700 | [diff] [blame] | 32 | cc_library_static { |
| 33 | host_supported: true, |
Harish Mahendrakar | 1915e68 | 2020-09-23 18:05:41 -0700 | [diff] [blame] | 34 | // vendor needed for libpreprocessing effects. |
| 35 | vendor: true, |
Andreas Huber | a9778f7 | 2019-08-20 09:26:33 -0700 | [diff] [blame] | 36 | name: "libsrtp2", |
| 37 | srcs: [ |
| 38 | "crypto/cipher/aes.c", |
| 39 | "crypto/cipher/aes_icm.c", |
| 40 | "crypto/cipher/cipher.c", |
| 41 | "crypto/cipher/null_cipher.c", |
| 42 | "crypto/hash/auth.c", |
| 43 | "crypto/hash/hmac.c", |
| 44 | "crypto/hash/null_auth.c", |
| 45 | "crypto/hash/sha1.c", |
| 46 | "crypto/kernel/alloc.c", |
| 47 | "crypto/kernel/crypto_kernel.c", |
| 48 | "crypto/kernel/err.c", |
| 49 | "crypto/kernel/key.c", |
| 50 | "crypto/math/datatypes.c", |
| 51 | "crypto/math/stat.c", |
| 52 | "crypto/replay/rdb.c", |
| 53 | "crypto/replay/rdbx.c", |
| 54 | "crypto/replay/ut_sim.c", |
| 55 | "srtp/ekt.c", |
| 56 | "srtp/srtp.c", |
| 57 | ], |
| 58 | local_include_dirs: [ |
| 59 | "crypto/include", |
| 60 | "include", |
| 61 | ], |
| 62 | cflags: [ |
| 63 | "-Wno-unused-parameter", |
| 64 | "-Wno-implicit-function-declaration", |
| 65 | "-DHAVE_CONFIG_H", |
| 66 | ], |
| 67 | export_include_dirs: [ |
Jorge E. Moreira | d8f04c5 | 2020-07-14 15:45:18 -0700 | [diff] [blame] | 68 | "crypto/include", |
| 69 | "include", |
Andreas Huber | a9778f7 | 2019-08-20 09:26:33 -0700 | [diff] [blame] | 70 | "exported_include", |
| 71 | ], |
Harish Mahendrakar | 1915e68 | 2020-09-23 18:05:41 -0700 | [diff] [blame] | 72 | visibility: [ |
| 73 | "//external/webrtc:__subpackages__", |
| 74 | "//device/google/cuttlefish/host/frontend/webrtc:__subpackages__", |
| 75 | ], |
Andreas Huber | a9778f7 | 2019-08-20 09:26:33 -0700 | [diff] [blame] | 76 | } |
Branden Archer | e4705ff | 2020-10-15 16:05:09 -0700 | [diff] [blame] | 77 | |
| 78 | cc_fuzz { |
| 79 | name: "libsrtp2-fuzzer", |
| 80 | host_supported: true, |
| 81 | vendor: true, |
| 82 | static_libs: ["libsrtp2"], |
| 83 | cflags: [ |
| 84 | "-Wno-unused-parameter", |
| 85 | ], |
| 86 | srcs: [ |
| 87 | "fuzzer/fuzzer.c", |
| 88 | "fuzzer/mt19937.cpp", |
| 89 | "fuzzer/testmem.c", |
| 90 | ], |
| 91 | // There are so many corpus files that when all are used it |
| 92 | // exceeds the posix_spawn limit. So, only some of the files |
| 93 | // are used. |
| 94 | corpus: ["fuzzer/corpus/0*"], |
| 95 | fuzz_config: { |
| 96 | componentid: 87896 |
| 97 | } |
| 98 | } |