aboutsummaryrefslogtreecommitdiff
path: root/Android.bp
blob: b519445c89fa7794c6505ebfc23d78ffa95a6204 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
// Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
//
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file in the root of the source
// tree. An additional intellectual property rights grant can be found
// in the file PATENTS.  All contributing project authors may
// be found in the AUTHORS file in the root of the source tree.

// These defines will apply to all source files
// Think again before changing it
cc_defaults {
    name: "webrtc_flags",
    vendor: true,

    cflags: [
        "-DWEBRTC_POSIX",
        "-DWEBRTC_LINUX",
        "-DWEBRTC_THREAD_RR",
        "-DWEBRTC_CLOCK_TYPE_REALTIME",
        "-DWEBRTC_ANDROID",

        // The following macros are used by modules,
        // we might need to re-organize them
        // "-DWEBRTC_ANDROID_OPENSLES", // [module audio_device]
        // "-DNETEQ_VOICEENGINE_CODECS", // [module audio_coding neteq]
        // "-DWEBRTC_MODULE_UTILITY_VIDEO", // [module media_file] [module utility]

        // The following warnings are disabled in most webrtc modules,
        // until we upgrade to newer cleaner upstream webrtc.
        "-Wno-missing-field-initializers",
        "-Wno-unused-parameter",
    ],

    header_libs: ["libwebrtc_headers"],

    arch: {
        arm: {
            instruction_set: "arm",

            cflags: [
                "-DWEBRTC_ARCH_ARM",
                // "-DWEBRTC_DETECT_ARM_NEON", // only used in a build configuration without Neon
                // TODO(kma): figure out if the above define could be moved to NDK build only.

                // The following upstram ARM_NEON and ARMV7A defintions do not work on AOSP yet.
                // They should be fixed in the next merge from upstream.
                //# TODO(kma): test if the code under next two macros works with generic GCC compilers
                // "-DWEBRTC_ARCH_ARM_NEON",
                // "-flax-vector-conversions",
                // "-DWEBRTC_ARCH_ARM_V7A",
            ],
        },
    },

    // The following clang-tidy checks are disabled in most webrtc modules,
    // until we upgrade to newer cleaner upstream webrtc.
    tidy_checks: [
        "-cert-*",
        "-clang-analyzer-*",
        "-hicpp-*",
        "-llvm-*",
        "-google-build-namespaces",
        "-google-default-arguments",
        "-google-explicit-constructor",
        "-google-runtime-int",
        "-google-runtime-operator",
        "-misc-incorrect-roundings",
        "-misc-macro-parentheses",
        "-misc-misplaced-widening-cast",
        "-misc-noexcept-move-constructor",
        "-misc-suspicious-string-compare",
        "-misc-unused-parameters",
        "-misc-unused-using-decls",
        "-performance-type-promotion-in-math-fn",
        "-performance-unnecessary-copy-initialization",
        "-performance-unnecessary-value-param",
    ],
}

cc_library_shared {
    name: "libwebrtc_audio_preprocessing",
    vendor: true,

    whole_static_libs: [
        "libwebrtc_aec",
        "libwebrtc_aecm",
        "libwebrtc_agc",
        "libwebrtc_apm",
        "libwebrtc_apm_utility",
        "libwebrtc_apvad",
        "libwebrtc_base",
        "libwebrtc_beamformer",
        "libwebrtc_common",
        "libwebrtc_intell",
        "libwebrtc_isac",
        "libwebrtc_resampler",
        "libwebrtc_ns",
        "libwebrtc_spl",
        "libwebrtc_system_wrappers",
        "libwebrtc_transient",
        "libwebrtc_vad",
    ],

    shared_libs: [
        "liblog",
        "libcutils",
        "libdl",
        "libprotobuf-cpp-lite",
    ],

    arch: {
        arm: {
            instruction_set: "arm",
        },
    },
}

cc_library_shared {
    name: "libwebrtc_audio_coding",
    vendor: true,

    whole_static_libs: [
        "libwebrtc_base",
        "libwebrtc_common",
        "libwebrtc_intell",
        "libwebrtc_isac",
        "libwebrtc_isacfix",
        "libwebrtc_resampler",
        "libwebrtc_spl",
        "libwebrtc_system_wrappers",
    ],

    shared_libs: [
        "libprotobuf-cpp-lite",
        "liblog",
        "libcutils",
        "libdl",
    ],

    arch: {
        arm: {
            instruction_set: "arm",
        },
    },
}

cc_library_headers {
    name: "libwebrtc_headers",
    vendor: true,
    export_include_dirs: ["."],
}

subdirs = ["webrtc/*"]