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/desktop_capture/desktop_frame.cc",
32    "/third_party/libwebrtc/modules/desktop_capture/desktop_geometry.cc",
33    "/third_party/libwebrtc/modules/desktop_capture/desktop_region.cc",
34    "/third_party/libwebrtc/modules/desktop_capture/shared_desktop_frame.cc",
35    "/third_party/libwebrtc/modules/desktop_capture/shared_memory.cc"
36]
37
38if not CONFIG["MOZ_DEBUG"]:
39
40    DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "0"
41    DEFINES["NDEBUG"] = True
42    DEFINES["NVALGRIND"] = True
43
44if CONFIG["MOZ_DEBUG"] == "1":
45
46    DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
47
48if CONFIG["OS_TARGET"] == "Darwin":
49
50    DEFINES["WEBRTC_MAC"] = True
51    DEFINES["WEBRTC_POSIX"] = True
52    DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True
53    DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0"
54    DEFINES["__STDC_CONSTANT_MACROS"] = True
55    DEFINES["__STDC_FORMAT_MACROS"] = True
56
57if CONFIG["OS_TARGET"] == "FreeBSD":
58
59    DEFINES["USE_GLIB"] = "1"
60    DEFINES["WEBRTC_BSD"] = True
61    DEFINES["WEBRTC_POSIX"] = True
62    DEFINES["_FILE_OFFSET_BITS"] = "64"
63    DEFINES["_LARGEFILE64_SOURCE"] = True
64    DEFINES["_LARGEFILE_SOURCE"] = True
65    DEFINES["__STDC_CONSTANT_MACROS"] = True
66    DEFINES["__STDC_FORMAT_MACROS"] = True
67
68if CONFIG["OS_TARGET"] == "Linux":
69
70    DEFINES["USE_AURA"] = "1"
71    DEFINES["USE_GLIB"] = "1"
72    DEFINES["USE_NSS_CERTS"] = "1"
73    DEFINES["USE_OZONE"] = "1"
74    DEFINES["USE_UDEV"] = True
75    DEFINES["USE_X11"] = "1"
76    DEFINES["WEBRTC_LINUX"] = True
77    DEFINES["WEBRTC_POSIX"] = True
78    DEFINES["_FILE_OFFSET_BITS"] = "64"
79    DEFINES["_GNU_SOURCE"] = True
80    DEFINES["_LARGEFILE64_SOURCE"] = True
81    DEFINES["_LARGEFILE_SOURCE"] = True
82    DEFINES["__STDC_CONSTANT_MACROS"] = True
83    DEFINES["__STDC_FORMAT_MACROS"] = True
84
85if CONFIG["OS_TARGET"] == "OpenBSD":
86
87    DEFINES["USE_GLIB"] = "1"
88    DEFINES["WEBRTC_BSD"] = True
89    DEFINES["WEBRTC_POSIX"] = True
90    DEFINES["_FILE_OFFSET_BITS"] = "64"
91    DEFINES["_LARGEFILE64_SOURCE"] = True
92    DEFINES["_LARGEFILE_SOURCE"] = True
93    DEFINES["__STDC_CONSTANT_MACROS"] = True
94    DEFINES["__STDC_FORMAT_MACROS"] = True
95
96if CONFIG["OS_TARGET"] == "WINNT":
97
98    DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True
99    DEFINES["NOMINMAX"] = True
100    DEFINES["NTDDI_VERSION"] = "0x0A000000"
101    DEFINES["PSAPI_VERSION"] = "2"
102    DEFINES["UNICODE"] = True
103    DEFINES["USE_AURA"] = "1"
104    DEFINES["WEBRTC_WIN"] = True
105    DEFINES["WIN32"] = True
106    DEFINES["WIN32_LEAN_AND_MEAN"] = True
107    DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP"
108    DEFINES["WINVER"] = "0x0A00"
109    DEFINES["_ATL_NO_OPENGL"] = True
110    DEFINES["_CRT_RAND_S"] = True
111    DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True
112    DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True
113    DEFINES["_HAS_EXCEPTIONS"] = "0"
114    DEFINES["_HAS_NODISCARD"] = True
115    DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True
116    DEFINES["_SECURE_ATL"] = True
117    DEFINES["_UNICODE"] = True
118    DEFINES["_WIN32_WINNT"] = "0x0A00"
119    DEFINES["_WINDOWS"] = True
120    DEFINES["__STD_C"] = True
121
122if CONFIG["CPU_ARCH"] == "aarch64":
123
124    DEFINES["WEBRTC_ARCH_ARM64"] = True
125    DEFINES["WEBRTC_HAS_NEON"] = True
126
127if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
128
129    DEFINES["_FORTIFY_SOURCE"] = "2"
130
131if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD":
132
133    DEFINES["_FORTIFY_SOURCE"] = "2"
134
135if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
136
137    DEFINES["_FORTIFY_SOURCE"] = "2"
138
139if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "OpenBSD":
140
141    DEFINES["_FORTIFY_SOURCE"] = "2"
142
143if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
144
145    DEFINES["_DEBUG"] = True
146
147if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD":
148
149    DEFINES["_DEBUG"] = True
150
151if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
152
153    DEFINES["_DEBUG"] = True
154
155if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD":
156
157    DEFINES["_DEBUG"] = True
158
159if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT":
160
161    DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0"
162
163if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
164
165    CXXFLAGS += [
166        "-msse2"
167    ]
168
169if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux":
170
171    DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6"
172
173if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
174
175    CXXFLAGS += [
176        "-msse2"
177    ]
178
179    DEFINES["CR_SYSROOT_HASH"] = "d967bcef40477dbc39acef141ff22bf73f3e7cdb"
180
181if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux":
182
183    DEFINES["CR_SYSROOT_HASH"] = "5f64b417e1018dcf8fcc81dc2714e0f264b9b911"
184
185Library("primitives_gn")
186