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/video/alignment_adjuster.cc",
32    "/third_party/libwebrtc/video/encoder_bitrate_adjuster.cc",
33    "/third_party/libwebrtc/video/encoder_overshoot_detector.cc",
34    "/third_party/libwebrtc/video/frame_encode_metadata_writer.cc",
35    "/third_party/libwebrtc/video/video_source_sink_controller.cc",
36    "/third_party/libwebrtc/video/video_stream_encoder.cc"
37]
38
39if not CONFIG["MOZ_DEBUG"]:
40
41    DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "0"
42    DEFINES["NDEBUG"] = True
43    DEFINES["NVALGRIND"] = True
44
45if CONFIG["MOZ_DEBUG"] == "1":
46
47    DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
48
49if CONFIG["OS_TARGET"] == "Android":
50
51    DEFINES["ANDROID"] = True
52    DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r20_1"
53    DEFINES["HAVE_SYS_UIO_H"] = True
54    DEFINES["WEBRTC_ANDROID"] = True
55    DEFINES["WEBRTC_ANDROID_OPENSLES"] = True
56    DEFINES["WEBRTC_LINUX"] = True
57    DEFINES["WEBRTC_POSIX"] = True
58    DEFINES["_GNU_SOURCE"] = True
59    DEFINES["__STDC_CONSTANT_MACROS"] = True
60    DEFINES["__STDC_FORMAT_MACROS"] = True
61
62    OS_LIBS += [
63        "GLESv2",
64        "log"
65    ]
66
67if CONFIG["OS_TARGET"] == "Darwin":
68
69    DEFINES["WEBRTC_MAC"] = True
70    DEFINES["WEBRTC_POSIX"] = True
71    DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True
72    DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0"
73    DEFINES["__STDC_CONSTANT_MACROS"] = True
74    DEFINES["__STDC_FORMAT_MACROS"] = True
75
76if CONFIG["OS_TARGET"] == "FreeBSD":
77
78    DEFINES["USE_GLIB"] = "1"
79    DEFINES["WEBRTC_BSD"] = True
80    DEFINES["WEBRTC_POSIX"] = True
81    DEFINES["_FILE_OFFSET_BITS"] = "64"
82    DEFINES["_LARGEFILE64_SOURCE"] = True
83    DEFINES["_LARGEFILE_SOURCE"] = True
84    DEFINES["__STDC_CONSTANT_MACROS"] = True
85    DEFINES["__STDC_FORMAT_MACROS"] = True
86
87if CONFIG["OS_TARGET"] == "Linux":
88
89    DEFINES["USE_AURA"] = "1"
90    DEFINES["USE_GLIB"] = "1"
91    DEFINES["USE_NSS_CERTS"] = "1"
92    DEFINES["USE_OZONE"] = "1"
93    DEFINES["USE_UDEV"] = True
94    DEFINES["USE_X11"] = "1"
95    DEFINES["WEBRTC_LINUX"] = True
96    DEFINES["WEBRTC_POSIX"] = True
97    DEFINES["_FILE_OFFSET_BITS"] = "64"
98    DEFINES["_GNU_SOURCE"] = True
99    DEFINES["_LARGEFILE64_SOURCE"] = True
100    DEFINES["_LARGEFILE_SOURCE"] = True
101    DEFINES["__STDC_CONSTANT_MACROS"] = True
102    DEFINES["__STDC_FORMAT_MACROS"] = True
103
104    OS_LIBS += [
105        "dl",
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("video_stream_encoder_impl_gn")
250