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_APM_DEBUG_DUMP"] = "0"
15DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0"
16DEFINES["WEBRTC_LIBRARY_IMPL"] = True
17DEFINES["WEBRTC_MOZILLA_BUILD"] = True
18DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0"
19
20FINAL_LIBRARY = "webrtc"
21
22
23LOCAL_INCLUDES += [
24    "!/ipc/ipdl/_ipdlheaders",
25    "/ipc/chromium/src",
26    "/third_party/libwebrtc/",
27    "/third_party/libwebrtc/third_party/abseil-cpp/",
28    "/tools/profiler/public"
29]
30
31UNIFIED_SOURCES += [
32    "/third_party/libwebrtc/modules/audio_processing/ns/fast_math.cc",
33    "/third_party/libwebrtc/modules/audio_processing/ns/histograms.cc",
34    "/third_party/libwebrtc/modules/audio_processing/ns/noise_estimator.cc",
35    "/third_party/libwebrtc/modules/audio_processing/ns/noise_suppressor.cc",
36    "/third_party/libwebrtc/modules/audio_processing/ns/ns_fft.cc",
37    "/third_party/libwebrtc/modules/audio_processing/ns/prior_signal_model.cc",
38    "/third_party/libwebrtc/modules/audio_processing/ns/prior_signal_model_estimator.cc",
39    "/third_party/libwebrtc/modules/audio_processing/ns/quantile_noise_estimator.cc",
40    "/third_party/libwebrtc/modules/audio_processing/ns/signal_model.cc",
41    "/third_party/libwebrtc/modules/audio_processing/ns/signal_model_estimator.cc",
42    "/third_party/libwebrtc/modules/audio_processing/ns/speech_probability_estimator.cc",
43    "/third_party/libwebrtc/modules/audio_processing/ns/suppression_params.cc",
44    "/third_party/libwebrtc/modules/audio_processing/ns/wiener_filter.cc"
45]
46
47if not CONFIG["MOZ_DEBUG"]:
48
49    DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "0"
50    DEFINES["NDEBUG"] = True
51    DEFINES["NVALGRIND"] = True
52
53if CONFIG["MOZ_DEBUG"] == "1":
54
55    DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
56
57if CONFIG["OS_TARGET"] == "Android":
58
59    DEFINES["ANDROID"] = True
60    DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r20_1"
61    DEFINES["HAVE_SYS_UIO_H"] = True
62    DEFINES["WEBRTC_ANDROID"] = True
63    DEFINES["WEBRTC_ANDROID_OPENSLES"] = True
64    DEFINES["WEBRTC_LINUX"] = True
65    DEFINES["WEBRTC_POSIX"] = True
66    DEFINES["_GNU_SOURCE"] = True
67    DEFINES["__STDC_CONSTANT_MACROS"] = True
68    DEFINES["__STDC_FORMAT_MACROS"] = True
69
70    OS_LIBS += [
71        "log"
72    ]
73
74if CONFIG["OS_TARGET"] == "Darwin":
75
76    DEFINES["WEBRTC_MAC"] = True
77    DEFINES["WEBRTC_POSIX"] = True
78    DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True
79    DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0"
80    DEFINES["__STDC_CONSTANT_MACROS"] = True
81    DEFINES["__STDC_FORMAT_MACROS"] = True
82
83if CONFIG["OS_TARGET"] == "FreeBSD":
84
85    DEFINES["USE_GLIB"] = "1"
86    DEFINES["WEBRTC_BSD"] = True
87    DEFINES["WEBRTC_POSIX"] = True
88    DEFINES["_FILE_OFFSET_BITS"] = "64"
89    DEFINES["_LARGEFILE64_SOURCE"] = True
90    DEFINES["_LARGEFILE_SOURCE"] = True
91    DEFINES["__STDC_CONSTANT_MACROS"] = True
92    DEFINES["__STDC_FORMAT_MACROS"] = True
93
94if CONFIG["OS_TARGET"] == "Linux":
95
96    DEFINES["USE_AURA"] = "1"
97    DEFINES["USE_GLIB"] = "1"
98    DEFINES["USE_NSS_CERTS"] = "1"
99    DEFINES["USE_OZONE"] = "1"
100    DEFINES["USE_UDEV"] = True
101    DEFINES["USE_X11"] = "1"
102    DEFINES["WEBRTC_LINUX"] = True
103    DEFINES["WEBRTC_POSIX"] = True
104    DEFINES["_FILE_OFFSET_BITS"] = "64"
105    DEFINES["_GNU_SOURCE"] = True
106    DEFINES["_LARGEFILE64_SOURCE"] = True
107    DEFINES["_LARGEFILE_SOURCE"] = True
108    DEFINES["__STDC_CONSTANT_MACROS"] = True
109    DEFINES["__STDC_FORMAT_MACROS"] = True
110
111    OS_LIBS += [
112        "rt"
113    ]
114
115if CONFIG["OS_TARGET"] == "OpenBSD":
116
117    DEFINES["USE_GLIB"] = "1"
118    DEFINES["WEBRTC_BSD"] = True
119    DEFINES["WEBRTC_POSIX"] = True
120    DEFINES["_FILE_OFFSET_BITS"] = "64"
121    DEFINES["_LARGEFILE64_SOURCE"] = True
122    DEFINES["_LARGEFILE_SOURCE"] = True
123    DEFINES["__STDC_CONSTANT_MACROS"] = True
124    DEFINES["__STDC_FORMAT_MACROS"] = True
125
126if CONFIG["OS_TARGET"] == "WINNT":
127
128    DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True
129    DEFINES["NOMINMAX"] = True
130    DEFINES["NTDDI_VERSION"] = "0x0A000000"
131    DEFINES["PSAPI_VERSION"] = "2"
132    DEFINES["UNICODE"] = True
133    DEFINES["USE_AURA"] = "1"
134    DEFINES["WEBRTC_WIN"] = True
135    DEFINES["WIN32"] = True
136    DEFINES["WIN32_LEAN_AND_MEAN"] = True
137    DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP"
138    DEFINES["WINVER"] = "0x0A00"
139    DEFINES["_ATL_NO_OPENGL"] = True
140    DEFINES["_CRT_RAND_S"] = True
141    DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True
142    DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True
143    DEFINES["_HAS_EXCEPTIONS"] = "0"
144    DEFINES["_HAS_NODISCARD"] = True
145    DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True
146    DEFINES["_SECURE_ATL"] = True
147    DEFINES["_UNICODE"] = True
148    DEFINES["_WIN32_WINNT"] = "0x0A00"
149    DEFINES["_WINDOWS"] = True
150    DEFINES["__STD_C"] = True
151
152    OS_LIBS += [
153        "crypt32",
154        "iphlpapi",
155        "secur32",
156        "winmm"
157    ]
158
159if CONFIG["CPU_ARCH"] == "aarch64":
160
161    DEFINES["WEBRTC_ARCH_ARM64"] = True
162    DEFINES["WEBRTC_HAS_NEON"] = True
163
164if CONFIG["CPU_ARCH"] == "arm":
165
166    CXXFLAGS += [
167        "-mfpu=neon"
168    ]
169
170    DEFINES["WEBRTC_ARCH_ARM"] = True
171    DEFINES["WEBRTC_ARCH_ARM_V7"] = True
172    DEFINES["WEBRTC_HAS_NEON"] = True
173
174    OS_LIBS += [
175        "android_support",
176        "unwind"
177    ]
178
179if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Android":
180
181    DEFINES["_FORTIFY_SOURCE"] = "2"
182
183if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
184
185    DEFINES["_FORTIFY_SOURCE"] = "2"
186
187if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD":
188
189    DEFINES["_FORTIFY_SOURCE"] = "2"
190
191if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
192
193    DEFINES["_FORTIFY_SOURCE"] = "2"
194
195if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "OpenBSD":
196
197    DEFINES["_FORTIFY_SOURCE"] = "2"
198
199if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android":
200
201    DEFINES["_DEBUG"] = True
202
203if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
204
205    DEFINES["_DEBUG"] = True
206
207if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD":
208
209    DEFINES["_DEBUG"] = True
210
211if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
212
213    DEFINES["_DEBUG"] = True
214
215if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD":
216
217    DEFINES["_DEBUG"] = True
218
219if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT":
220
221    DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0"
222
223if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
224
225    CXXFLAGS += [
226        "-msse2"
227    ]
228
229    OS_LIBS += [
230        "android_support"
231    ]
232
233if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
234
235    CXXFLAGS += [
236        "-msse2"
237    ]
238
239if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux":
240
241    DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6"
242
243if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
244
245    CXXFLAGS += [
246        "-msse2"
247    ]
248
249    DEFINES["CR_SYSROOT_HASH"] = "d967bcef40477dbc39acef141ff22bf73f3e7cdb"
250
251if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux":
252
253    DEFINES["CR_SYSROOT_HASH"] = "5f64b417e1018dcf8fcc81dc2714e0f264b9b911"
254
255Library("ns_gn")
256