1# This Source Code Form is subject to the terms of the Mozilla Public
2# License, v. 2.0. If a copy of the MPL was not distributed with this
3# file, You can obtain one at http://mozilla.org/MPL/2.0/.
4
5
6  ### This moz.build was AUTOMATICALLY GENERATED from a GN config,  ###
7  ### DO NOT edit it by hand.                                       ###
8
9COMPILE_FLAGS["OS_INCLUDES"] = []
10AllowCompilerWarnings()
11
12DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1"
13DEFINES["RTC_ENABLE_VP9"] = True
14DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0"
15DEFINES["WEBRTC_LIBRARY_IMPL"] = True
16DEFINES["WEBRTC_MOZILLA_BUILD"] = True
17DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0"
18
19FINAL_LIBRARY = "webrtc"
20
21
22LOCAL_INCLUDES += [
23    "!/ipc/ipdl/_ipdlheaders",
24    "/ipc/chromium/src",
25    "/third_party/libwebrtc/",
26    "/third_party/libwebrtc/third_party/abseil-cpp/",
27    "/tools/profiler/public"
28]
29
30UNIFIED_SOURCES += [
31    "/third_party/libwebrtc/modules/audio_processing/vad/gmm.cc",
32    "/third_party/libwebrtc/modules/audio_processing/vad/pitch_based_vad.cc",
33    "/third_party/libwebrtc/modules/audio_processing/vad/pitch_internal.cc",
34    "/third_party/libwebrtc/modules/audio_processing/vad/pole_zero_filter.cc",
35    "/third_party/libwebrtc/modules/audio_processing/vad/standalone_vad.cc",
36    "/third_party/libwebrtc/modules/audio_processing/vad/vad_audio_proc.cc",
37    "/third_party/libwebrtc/modules/audio_processing/vad/vad_circular_buffer.cc",
38    "/third_party/libwebrtc/modules/audio_processing/vad/voice_activity_detector.cc"
39]
40
41if not CONFIG["MOZ_DEBUG"]:
42
43    DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "0"
44    DEFINES["NDEBUG"] = True
45    DEFINES["NVALGRIND"] = True
46
47if CONFIG["MOZ_DEBUG"] == "1":
48
49    DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
50
51if CONFIG["OS_TARGET"] == "Android":
52
53    DEFINES["ANDROID"] = True
54    DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r20_1"
55    DEFINES["HAVE_SYS_UIO_H"] = True
56    DEFINES["WEBRTC_ANDROID"] = True
57    DEFINES["WEBRTC_ANDROID_OPENSLES"] = True
58    DEFINES["WEBRTC_LINUX"] = True
59    DEFINES["WEBRTC_POSIX"] = True
60    DEFINES["_GNU_SOURCE"] = True
61    DEFINES["__STDC_CONSTANT_MACROS"] = True
62    DEFINES["__STDC_FORMAT_MACROS"] = True
63
64    OS_LIBS += [
65        "log"
66    ]
67
68if CONFIG["OS_TARGET"] == "Darwin":
69
70    DEFINES["WEBRTC_MAC"] = True
71    DEFINES["WEBRTC_POSIX"] = True
72    DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True
73    DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0"
74    DEFINES["__STDC_CONSTANT_MACROS"] = True
75    DEFINES["__STDC_FORMAT_MACROS"] = True
76
77if CONFIG["OS_TARGET"] == "FreeBSD":
78
79    DEFINES["USE_GLIB"] = "1"
80    DEFINES["WEBRTC_BSD"] = True
81    DEFINES["WEBRTC_POSIX"] = True
82    DEFINES["_FILE_OFFSET_BITS"] = "64"
83    DEFINES["_LARGEFILE64_SOURCE"] = True
84    DEFINES["_LARGEFILE_SOURCE"] = True
85    DEFINES["__STDC_CONSTANT_MACROS"] = True
86    DEFINES["__STDC_FORMAT_MACROS"] = True
87
88if CONFIG["OS_TARGET"] == "Linux":
89
90    DEFINES["USE_AURA"] = "1"
91    DEFINES["USE_GLIB"] = "1"
92    DEFINES["USE_NSS_CERTS"] = "1"
93    DEFINES["USE_OZONE"] = "1"
94    DEFINES["USE_UDEV"] = True
95    DEFINES["USE_X11"] = "1"
96    DEFINES["WEBRTC_LINUX"] = True
97    DEFINES["WEBRTC_POSIX"] = True
98    DEFINES["_FILE_OFFSET_BITS"] = "64"
99    DEFINES["_GNU_SOURCE"] = True
100    DEFINES["_LARGEFILE64_SOURCE"] = True
101    DEFINES["_LARGEFILE_SOURCE"] = True
102    DEFINES["__STDC_CONSTANT_MACROS"] = True
103    DEFINES["__STDC_FORMAT_MACROS"] = True
104
105    OS_LIBS += [
106        "rt"
107    ]
108
109if CONFIG["OS_TARGET"] == "OpenBSD":
110
111    DEFINES["USE_GLIB"] = "1"
112    DEFINES["WEBRTC_BSD"] = True
113    DEFINES["WEBRTC_POSIX"] = True
114    DEFINES["_FILE_OFFSET_BITS"] = "64"
115    DEFINES["_LARGEFILE64_SOURCE"] = True
116    DEFINES["_LARGEFILE_SOURCE"] = True
117    DEFINES["__STDC_CONSTANT_MACROS"] = True
118    DEFINES["__STDC_FORMAT_MACROS"] = True
119
120if CONFIG["OS_TARGET"] == "WINNT":
121
122    DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True
123    DEFINES["NOMINMAX"] = True
124    DEFINES["NTDDI_VERSION"] = "0x0A000000"
125    DEFINES["PSAPI_VERSION"] = "2"
126    DEFINES["UNICODE"] = True
127    DEFINES["USE_AURA"] = "1"
128    DEFINES["WEBRTC_WIN"] = True
129    DEFINES["WIN32"] = True
130    DEFINES["WIN32_LEAN_AND_MEAN"] = True
131    DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP"
132    DEFINES["WINVER"] = "0x0A00"
133    DEFINES["_ATL_NO_OPENGL"] = True
134    DEFINES["_CRT_RAND_S"] = True
135    DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True
136    DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True
137    DEFINES["_HAS_EXCEPTIONS"] = "0"
138    DEFINES["_HAS_NODISCARD"] = True
139    DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True
140    DEFINES["_SECURE_ATL"] = True
141    DEFINES["_UNICODE"] = True
142    DEFINES["_WIN32_WINNT"] = "0x0A00"
143    DEFINES["_WINDOWS"] = True
144    DEFINES["__STD_C"] = True
145
146    OS_LIBS += [
147        "crypt32",
148        "iphlpapi",
149        "secur32",
150        "winmm"
151    ]
152
153if CONFIG["CPU_ARCH"] == "aarch64":
154
155    DEFINES["WEBRTC_ARCH_ARM64"] = True
156    DEFINES["WEBRTC_HAS_NEON"] = True
157
158if CONFIG["CPU_ARCH"] == "arm":
159
160    CXXFLAGS += [
161        "-mfpu=neon"
162    ]
163
164    DEFINES["WEBRTC_ARCH_ARM"] = True
165    DEFINES["WEBRTC_ARCH_ARM_V7"] = True
166    DEFINES["WEBRTC_HAS_NEON"] = True
167
168    OS_LIBS += [
169        "android_support",
170        "unwind"
171    ]
172
173if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Android":
174
175    DEFINES["_FORTIFY_SOURCE"] = "2"
176
177if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
178
179    DEFINES["_FORTIFY_SOURCE"] = "2"
180
181if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD":
182
183    DEFINES["_FORTIFY_SOURCE"] = "2"
184
185if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
186
187    DEFINES["_FORTIFY_SOURCE"] = "2"
188
189if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "OpenBSD":
190
191    DEFINES["_FORTIFY_SOURCE"] = "2"
192
193if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android":
194
195    DEFINES["_DEBUG"] = True
196
197if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
198
199    DEFINES["_DEBUG"] = True
200
201if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD":
202
203    DEFINES["_DEBUG"] = True
204
205if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
206
207    DEFINES["_DEBUG"] = True
208
209if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD":
210
211    DEFINES["_DEBUG"] = True
212
213if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT":
214
215    DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0"
216
217if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
218
219    CXXFLAGS += [
220        "-msse2"
221    ]
222
223    OS_LIBS += [
224        "android_support"
225    ]
226
227if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
228
229    CXXFLAGS += [
230        "-msse2"
231    ]
232
233if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux":
234
235    DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6"
236
237if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
238
239    CXXFLAGS += [
240        "-msse2"
241    ]
242
243    DEFINES["CR_SYSROOT_HASH"] = "d967bcef40477dbc39acef141ff22bf73f3e7cdb"
244
245if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux":
246
247    DEFINES["CR_SYSROOT_HASH"] = "5f64b417e1018dcf8fcc81dc2714e0f264b9b911"
248
249Library("vad_gn")
250