tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

moz.build (28565B)


      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 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
      9     CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
     10 CXXFLAGS += CONFIG["MOZ_GBM_CFLAGS"]
     11 if not CONFIG["MOZ_SYSTEM_GBM"]:
     12     LOCAL_INCLUDES += [ "/third_party/gbm/gbm/" ]
     13 CXXFLAGS += CONFIG["MOZ_LIBDRM_CFLAGS"]
     14 if not CONFIG["MOZ_SYSTEM_LIBDRM"]:
     15     LOCAL_INCLUDES += [ "/third_party/drm/drm/",
     16                         "/third_party/drm/drm/include/",
     17                         "/third_party/drm/drm/include/libdrm" ]
     18 CXXFLAGS += CONFIG["MOZ_PIPEWIRE_CFLAGS"]
     19 if not CONFIG["MOZ_SYSTEM_PIPEWIRE"]:
     20     LOCAL_INCLUDES += [ "/third_party/pipewire/" ]
     21 
     22 COMPILE_FLAGS["OS_INCLUDES"] = []
     23 AllowCompilerWarnings()
     24 
     25 DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1"
     26 DEFINES["PROTOBUF_ENABLE_DEBUG_LOGGING_MAY_LEAK_PII"] = "0"
     27 DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True
     28 DEFINES["RTC_ENABLE_VP9"] = True
     29 DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0"
     30 DEFINES["WEBRTC_ENCODER_PSNR_STATS"] = True
     31 DEFINES["WEBRTC_LIBRARY_IMPL"] = True
     32 DEFINES["WEBRTC_MOZILLA_BUILD"] = True
     33 DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0"
     34 DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0"
     35 
     36 FINAL_LIBRARY = "xul"
     37 
     38 
     39 LOCAL_INCLUDES += [
     40     "!/dist/include/libwebrtc_overrides",
     41     "!/ipc/ipdl/_ipdlheaders",
     42     "!/third_party/libwebrtc/gen",
     43     "/ipc/chromium/src",
     44     "/media/libyuv/",
     45     "/media/libyuv/libyuv/include/",
     46     "/third_party/abseil-cpp/",
     47     "/third_party/libwebrtc/",
     48     "/tools/profiler/public"
     49 ]
     50 
     51 SOURCES += [
     52     "/third_party/libwebrtc/modules/desktop_capture/fallback_desktop_capturer_wrapper.cc"
     53 ]
     54 
     55 UNIFIED_SOURCES += [
     56     "/third_party/libwebrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc",
     57     "/third_party/libwebrtc/modules/desktop_capture/cropped_desktop_frame.cc",
     58     "/third_party/libwebrtc/modules/desktop_capture/cropping_window_capturer.cc",
     59     "/third_party/libwebrtc/modules/desktop_capture/desktop_and_cursor_composer.cc",
     60     "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_metrics_helper.cc",
     61     "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.cc",
     62     "/third_party/libwebrtc/modules/desktop_capture/desktop_capturer.cc",
     63     "/third_party/libwebrtc/modules/desktop_capture/desktop_capturer_differ_wrapper.cc",
     64     "/third_party/libwebrtc/modules/desktop_capture/desktop_capturer_wrapper.cc",
     65     "/third_party/libwebrtc/modules/desktop_capture/desktop_frame_generator.cc",
     66     "/third_party/libwebrtc/modules/desktop_capture/desktop_frame_rotation.cc",
     67     "/third_party/libwebrtc/modules/desktop_capture/differ_block.cc",
     68     "/third_party/libwebrtc/modules/desktop_capture/fake_desktop_capturer.cc",
     69     "/third_party/libwebrtc/modules/desktop_capture/full_screen_application_handler.cc",
     70     "/third_party/libwebrtc/modules/desktop_capture/full_screen_window_detector.cc",
     71     "/third_party/libwebrtc/modules/desktop_capture/mouse_cursor.cc",
     72     "/third_party/libwebrtc/modules/desktop_capture/resolution_tracker.cc",
     73     "/third_party/libwebrtc/modules/desktop_capture/rgba_color.cc",
     74     "/third_party/libwebrtc/modules/desktop_capture/screen_capturer_helper.cc",
     75     "/third_party/libwebrtc/modules/desktop_capture/window_finder.cc"
     76 ]
     77 
     78 if not CONFIG["MOZ_DEBUG"]:
     79 
     80     DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "0"
     81     DEFINES["NDEBUG"] = True
     82     DEFINES["NVALGRIND"] = True
     83 
     84 if CONFIG["MOZ_DEBUG"] == "1":
     85 
     86     DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
     87 
     88 if CONFIG["OS_TARGET"] == "Darwin":
     89 
     90     DEFINES["WEBRTC_MAC"] = True
     91     DEFINES["WEBRTC_POSIX"] = True
     92     DEFINES["__STDC_CONSTANT_MACROS"] = True
     93     DEFINES["__STDC_FORMAT_MACROS"] = True
     94 
     95     UNIFIED_SOURCES += [
     96         "/third_party/libwebrtc/modules/desktop_capture/mac/desktop_configuration_monitor.cc",
     97         "/third_party/libwebrtc/modules/desktop_capture/mac/desktop_frame_utils.cc",
     98         "/third_party/libwebrtc/modules/desktop_capture/mac/full_screen_mac_application_handler.cc",
     99         "/third_party/libwebrtc/modules/desktop_capture/mac/window_list_utils.cc"
    100     ]
    101 
    102 if CONFIG["OS_TARGET"] == "Linux":
    103 
    104     DEFINES["USE_AURA"] = "1"
    105     DEFINES["USE_GLIB"] = "1"
    106     DEFINES["USE_OZONE"] = "1"
    107     DEFINES["USE_UDEV"] = True
    108     DEFINES["WEBRTC_LINUX"] = True
    109     DEFINES["WEBRTC_POSIX"] = True
    110     DEFINES["_FILE_OFFSET_BITS"] = "64"
    111     DEFINES["_LARGEFILE64_SOURCE"] = True
    112     DEFINES["_LARGEFILE_SOURCE"] = True
    113     DEFINES["__STDC_CONSTANT_MACROS"] = True
    114     DEFINES["__STDC_FORMAT_MACROS"] = True
    115 
    116     SOURCES += [
    117         "/third_party/libwebrtc/modules/desktop_capture/mouse_cursor_monitor_linux.cc"
    118     ]
    119 
    120     UNIFIED_SOURCES += [
    121         "/third_party/libwebrtc/modules/desktop_capture/screen_capturer_linux.cc",
    122         "/third_party/libwebrtc/modules/desktop_capture/window_capturer_linux.cc"
    123     ]
    124 
    125 if CONFIG["OS_TARGET"] == "OpenBSD":
    126 
    127     DEFINES["USE_GLIB"] = "1"
    128     DEFINES["USE_OZONE"] = "1"
    129     DEFINES["WEBRTC_BSD"] = True
    130     DEFINES["WEBRTC_POSIX"] = True
    131     DEFINES["WEBRTC_USE_X11"] = True
    132     DEFINES["_FILE_OFFSET_BITS"] = "64"
    133     DEFINES["_LARGEFILE64_SOURCE"] = True
    134     DEFINES["_LARGEFILE_SOURCE"] = True
    135     DEFINES["__STDC_CONSTANT_MACROS"] = True
    136     DEFINES["__STDC_FORMAT_MACROS"] = True
    137 
    138     OS_LIBS += [
    139         "X11",
    140         "Xcomposite",
    141         "Xdamage",
    142         "Xext",
    143         "Xfixes",
    144         "Xrandr",
    145         "Xrender"
    146     ]
    147 
    148     SOURCES += [
    149         "/third_party/libwebrtc/modules/desktop_capture/mouse_cursor_monitor_linux.cc"
    150     ]
    151 
    152     UNIFIED_SOURCES += [
    153         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/mouse_cursor_monitor_x11.cc",
    154         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/screen_capturer_x11.cc",
    155         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/shared_x_display.cc",
    156         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_capturer_x11.cc",
    157         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_finder_x11.cc",
    158         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_list_utils.cc",
    159         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_atom_cache.cc",
    160         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_server_pixel_buffer.cc",
    161         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_window_property.cc",
    162         "/third_party/libwebrtc/modules/desktop_capture/screen_capturer_linux.cc",
    163         "/third_party/libwebrtc/modules/desktop_capture/window_capturer_linux.cc"
    164     ]
    165 
    166 if CONFIG["OS_TARGET"] == "WINNT":
    167 
    168     DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True
    169     DEFINES["NOMINMAX"] = True
    170     DEFINES["NTDDI_VERSION"] = "0x0A000000"
    171     DEFINES["PSAPI_VERSION"] = "2"
    172     DEFINES["RTC_ENABLE_WIN_WGC"] = True
    173     DEFINES["UNICODE"] = True
    174     DEFINES["USE_AURA"] = "1"
    175     DEFINES["WEBRTC_WIN"] = True
    176     DEFINES["WIN32"] = True
    177     DEFINES["WIN32_LEAN_AND_MEAN"] = True
    178     DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP"
    179     DEFINES["WINVER"] = "0x0A00"
    180     DEFINES["_ATL_NO_OPENGL"] = True
    181     DEFINES["_CRT_NONSTDC_NO_WARNINGS"] = True
    182     DEFINES["_CRT_RAND_S"] = True
    183     DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True
    184     DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True
    185     DEFINES["_HAS_EXCEPTIONS"] = "0"
    186     DEFINES["_HAS_NODISCARD"] = True
    187     DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True
    188     DEFINES["_SECURE_ATL"] = True
    189     DEFINES["_UNICODE"] = True
    190     DEFINES["_WIN32_WINNT"] = "0x0A00"
    191     DEFINES["_WINDOWS"] = True
    192     DEFINES["_WINSOCK_DEPRECATED_NO_WARNINGS"] = True
    193     DEFINES["__STD_C"] = True
    194 
    195     OS_LIBS += [
    196         "crypt32",
    197         "d3d11",
    198         "dwmapi",
    199         "dxgi",
    200         "iphlpapi",
    201         "secur32",
    202         "shcore",
    203         "winmm"
    204     ]
    205 
    206     SOURCES += [
    207         "/third_party/libwebrtc/modules/desktop_capture/win/screen_capturer_win_gdi.cc"
    208     ]
    209 
    210     UNIFIED_SOURCES += [
    211         "/third_party/libwebrtc/modules/desktop_capture/cropping_window_capturer_win.cc",
    212         "/third_party/libwebrtc/modules/desktop_capture/desktop_frame_win.cc",
    213         "/third_party/libwebrtc/modules/desktop_capture/mouse_cursor_monitor_win.cc",
    214         "/third_party/libwebrtc/modules/desktop_capture/screen_capturer_win.cc",
    215         "/third_party/libwebrtc/modules/desktop_capture/win/cursor.cc",
    216         "/third_party/libwebrtc/modules/desktop_capture/win/d3d_device.cc",
    217         "/third_party/libwebrtc/modules/desktop_capture/win/desktop.cc",
    218         "/third_party/libwebrtc/modules/desktop_capture/win/desktop_capture_utils.cc",
    219         "/third_party/libwebrtc/modules/desktop_capture/win/display_configuration_monitor.cc",
    220         "/third_party/libwebrtc/modules/desktop_capture/win/dxgi_adapter_duplicator.cc",
    221         "/third_party/libwebrtc/modules/desktop_capture/win/dxgi_context.cc",
    222         "/third_party/libwebrtc/modules/desktop_capture/win/dxgi_duplicator_controller.cc",
    223         "/third_party/libwebrtc/modules/desktop_capture/win/dxgi_frame.cc",
    224         "/third_party/libwebrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc",
    225         "/third_party/libwebrtc/modules/desktop_capture/win/dxgi_texture.cc",
    226         "/third_party/libwebrtc/modules/desktop_capture/win/dxgi_texture_mapping.cc",
    227         "/third_party/libwebrtc/modules/desktop_capture/win/dxgi_texture_staging.cc",
    228         "/third_party/libwebrtc/modules/desktop_capture/win/full_screen_win_application_handler.cc",
    229         "/third_party/libwebrtc/modules/desktop_capture/win/scoped_thread_desktop.cc",
    230         "/third_party/libwebrtc/modules/desktop_capture/win/screen_capture_utils.cc",
    231         "/third_party/libwebrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc",
    232         "/third_party/libwebrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.cc",
    233         "/third_party/libwebrtc/modules/desktop_capture/win/selected_window_context.cc",
    234         "/third_party/libwebrtc/modules/desktop_capture/win/wgc_capture_session.cc",
    235         "/third_party/libwebrtc/modules/desktop_capture/win/wgc_capture_source.cc",
    236         "/third_party/libwebrtc/modules/desktop_capture/win/wgc_capturer_win.cc",
    237         "/third_party/libwebrtc/modules/desktop_capture/win/wgc_desktop_frame.cc",
    238         "/third_party/libwebrtc/modules/desktop_capture/win/window_capture_utils.cc",
    239         "/third_party/libwebrtc/modules/desktop_capture/win/window_capturer_win_gdi.cc",
    240         "/third_party/libwebrtc/modules/desktop_capture/window_capturer_win.cc",
    241         "/third_party/libwebrtc/modules/desktop_capture/window_finder_win.cc"
    242     ]
    243 
    244 if CONFIG["TARGET_CPU"] == "aarch64":
    245 
    246     DEFINES["WEBRTC_ARCH_ARM64"] = True
    247     DEFINES["WEBRTC_HAS_NEON"] = True
    248     DEFINES["__ARM_NEON__"] = "1"
    249 
    250 if CONFIG["TARGET_CPU"] == "arm":
    251 
    252     CXXFLAGS += [
    253         "-mfpu=neon"
    254     ]
    255 
    256     DEFINES["WEBRTC_ARCH_ARM"] = True
    257     DEFINES["WEBRTC_ARCH_ARM_V7"] = True
    258     DEFINES["WEBRTC_HAS_NEON"] = True
    259     DEFINES["WEBRTC_USE_PIPEWIRE"] = True
    260     DEFINES["_GNU_SOURCE"] = True
    261 
    262     LOCAL_INCLUDES += [
    263         "/third_party/libepoxy/libepoxy/include/",
    264         "/third_party/libwebrtc/third_party/libepoxy/libepoxy/include/"
    265     ]
    266 
    267     SOURCES += [
    268         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc"
    269     ]
    270 
    271     UNIFIED_SOURCES += [
    272         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc",
    273         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/mouse_cursor_monitor_pipewire.cc",
    274         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/restore_token_manager.cc",
    275         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screen_capture_portal_interface.cc",
    276         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_portal.cc",
    277         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_stream_utils.cc",
    278         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc"
    279     ]
    280 
    281 if CONFIG["TARGET_CPU"] == "loongarch64":
    282 
    283     DEFINES["WEBRTC_USE_X11"] = True
    284     DEFINES["_GNU_SOURCE"] = True
    285 
    286     OS_LIBS += [
    287         "X11",
    288         "Xcomposite",
    289         "Xdamage",
    290         "Xext",
    291         "Xfixes",
    292         "Xrandr",
    293         "Xrender"
    294     ]
    295 
    296     UNIFIED_SOURCES += [
    297         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/mouse_cursor_monitor_x11.cc",
    298         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/screen_capturer_x11.cc",
    299         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/shared_x_display.cc",
    300         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_capturer_x11.cc",
    301         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_finder_x11.cc",
    302         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_list_utils.cc",
    303         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_atom_cache.cc",
    304         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_server_pixel_buffer.cc",
    305         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_window_property.cc"
    306     ]
    307 
    308 if CONFIG["TARGET_CPU"] == "mips32":
    309 
    310     DEFINES["MIPS32_LE"] = True
    311     DEFINES["MIPS_FPU_LE"] = True
    312     DEFINES["WEBRTC_USE_PIPEWIRE"] = True
    313     DEFINES["_GNU_SOURCE"] = True
    314 
    315     LOCAL_INCLUDES += [
    316         "/third_party/libepoxy/libepoxy/include/",
    317         "/third_party/libwebrtc/third_party/libepoxy/libepoxy/include/"
    318     ]
    319 
    320     SOURCES += [
    321         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc"
    322     ]
    323 
    324     UNIFIED_SOURCES += [
    325         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc",
    326         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/mouse_cursor_monitor_pipewire.cc",
    327         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/restore_token_manager.cc",
    328         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screen_capture_portal_interface.cc",
    329         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_portal.cc",
    330         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_stream_utils.cc",
    331         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc"
    332     ]
    333 
    334 if CONFIG["TARGET_CPU"] == "mips64":
    335 
    336     DEFINES["WEBRTC_USE_PIPEWIRE"] = True
    337     DEFINES["_GNU_SOURCE"] = True
    338 
    339     LOCAL_INCLUDES += [
    340         "/third_party/libepoxy/libepoxy/include/",
    341         "/third_party/libwebrtc/third_party/libepoxy/libepoxy/include/"
    342     ]
    343 
    344     SOURCES += [
    345         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc"
    346     ]
    347 
    348     UNIFIED_SOURCES += [
    349         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc",
    350         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/mouse_cursor_monitor_pipewire.cc",
    351         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/restore_token_manager.cc",
    352         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screen_capture_portal_interface.cc",
    353         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_portal.cc",
    354         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_stream_utils.cc",
    355         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc"
    356     ]
    357 
    358 if CONFIG["TARGET_CPU"] == "ppc64":
    359 
    360     DEFINES["WEBRTC_USE_X11"] = True
    361 
    362     OS_LIBS += [
    363         "X11",
    364         "Xcomposite",
    365         "Xdamage",
    366         "Xext",
    367         "Xfixes",
    368         "Xrandr",
    369         "Xrender"
    370     ]
    371 
    372     UNIFIED_SOURCES += [
    373         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/mouse_cursor_monitor_x11.cc",
    374         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/screen_capturer_x11.cc",
    375         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/shared_x_display.cc",
    376         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_capturer_x11.cc",
    377         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_finder_x11.cc",
    378         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_list_utils.cc",
    379         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_atom_cache.cc",
    380         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_server_pixel_buffer.cc",
    381         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_window_property.cc"
    382     ]
    383 
    384 if CONFIG["TARGET_CPU"] == "x86":
    385 
    386     DEFINES["WEBRTC_ENABLE_AVX2"] = True
    387 
    388 if CONFIG["TARGET_CPU"] == "x86_64":
    389 
    390     DEFINES["WEBRTC_ENABLE_AVX2"] = True
    391 
    392 if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
    393 
    394     DEFINES["_DEBUG"] = True
    395 
    396 if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
    397 
    398     DEFINES["_DEBUG"] = True
    399 
    400 if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD":
    401 
    402     DEFINES["_DEBUG"] = True
    403 
    404 if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT":
    405 
    406     DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0"
    407 
    408 if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64":
    409 
    410     DEFINES["WEBRTC_USE_PIPEWIRE"] = True
    411     DEFINES["_GNU_SOURCE"] = True
    412 
    413     LOCAL_INCLUDES += [
    414         "/third_party/libepoxy/libepoxy/include/",
    415         "/third_party/libwebrtc/third_party/libepoxy/libepoxy/include/"
    416     ]
    417 
    418     SOURCES += [
    419         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc"
    420     ]
    421 
    422     UNIFIED_SOURCES += [
    423         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc",
    424         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/mouse_cursor_monitor_pipewire.cc",
    425         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/restore_token_manager.cc",
    426         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screen_capture_portal_interface.cc",
    427         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_portal.cc",
    428         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_stream_utils.cc",
    429         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc"
    430     ]
    431 
    432 if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "riscv64":
    433 
    434     DEFINES["WEBRTC_USE_X11"] = True
    435 
    436     OS_LIBS += [
    437         "X11",
    438         "Xcomposite",
    439         "Xdamage",
    440         "Xext",
    441         "Xfixes",
    442         "Xrandr",
    443         "Xrender"
    444     ]
    445 
    446     UNIFIED_SOURCES += [
    447         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/mouse_cursor_monitor_x11.cc",
    448         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/screen_capturer_x11.cc",
    449         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/shared_x_display.cc",
    450         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_capturer_x11.cc",
    451         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_finder_x11.cc",
    452         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_list_utils.cc",
    453         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_atom_cache.cc",
    454         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_server_pixel_buffer.cc",
    455         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_window_property.cc"
    456     ]
    457 
    458 if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86":
    459 
    460     CXXFLAGS += [
    461         "-msse2"
    462     ]
    463 
    464     DEFINES["WEBRTC_USE_PIPEWIRE"] = True
    465     DEFINES["_GNU_SOURCE"] = True
    466 
    467     LOCAL_INCLUDES += [
    468         "/third_party/libepoxy/libepoxy/include/",
    469         "/third_party/libwebrtc/third_party/libepoxy/libepoxy/include/"
    470     ]
    471 
    472     SOURCES += [
    473         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc"
    474     ]
    475 
    476     UNIFIED_SOURCES += [
    477         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc",
    478         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/mouse_cursor_monitor_pipewire.cc",
    479         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/restore_token_manager.cc",
    480         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screen_capture_portal_interface.cc",
    481         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_portal.cc",
    482         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_stream_utils.cc",
    483         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc"
    484     ]
    485 
    486 if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64":
    487 
    488     DEFINES["WEBRTC_USE_PIPEWIRE"] = True
    489     DEFINES["_GNU_SOURCE"] = True
    490 
    491     LOCAL_INCLUDES += [
    492         "/third_party/libepoxy/libepoxy/include/",
    493         "/third_party/libwebrtc/third_party/libepoxy/libepoxy/include/"
    494     ]
    495 
    496     SOURCES += [
    497         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc"
    498     ]
    499 
    500     UNIFIED_SOURCES += [
    501         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc",
    502         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/mouse_cursor_monitor_pipewire.cc",
    503         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/restore_token_manager.cc",
    504         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screen_capture_portal_interface.cc",
    505         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_portal.cc",
    506         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_stream_utils.cc",
    507         "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc"
    508     ]
    509 
    510 if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64":
    511 
    512     DEFINES["WEBRTC_USE_X11"] = True
    513 
    514     OS_LIBS += [
    515         "X11",
    516         "Xcomposite",
    517         "Xdamage",
    518         "Xext",
    519         "Xfixes",
    520         "Xrandr",
    521         "Xrender"
    522     ]
    523 
    524     UNIFIED_SOURCES += [
    525         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/mouse_cursor_monitor_x11.cc",
    526         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/screen_capturer_x11.cc",
    527         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/shared_x_display.cc",
    528         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_capturer_x11.cc",
    529         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_finder_x11.cc",
    530         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_list_utils.cc",
    531         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_atom_cache.cc",
    532         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_server_pixel_buffer.cc",
    533         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_window_property.cc"
    534     ]
    535 
    536 if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm":
    537 
    538     DEFINES["WEBRTC_USE_X11"] = True
    539 
    540     OS_LIBS += [
    541         "X11",
    542         "Xcomposite",
    543         "Xdamage",
    544         "Xext",
    545         "Xfixes",
    546         "Xrandr",
    547         "Xrender"
    548     ]
    549 
    550     UNIFIED_SOURCES += [
    551         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/mouse_cursor_monitor_x11.cc",
    552         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/screen_capturer_x11.cc",
    553         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/shared_x_display.cc",
    554         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_capturer_x11.cc",
    555         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_finder_x11.cc",
    556         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_list_utils.cc",
    557         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_atom_cache.cc",
    558         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_server_pixel_buffer.cc",
    559         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_window_property.cc"
    560     ]
    561 
    562 if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "mips32":
    563 
    564     DEFINES["WEBRTC_USE_X11"] = True
    565 
    566     OS_LIBS += [
    567         "X11",
    568         "Xcomposite",
    569         "Xdamage",
    570         "Xext",
    571         "Xfixes",
    572         "Xrandr",
    573         "Xrender"
    574     ]
    575 
    576     UNIFIED_SOURCES += [
    577         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/mouse_cursor_monitor_x11.cc",
    578         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/screen_capturer_x11.cc",
    579         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/shared_x_display.cc",
    580         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_capturer_x11.cc",
    581         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_finder_x11.cc",
    582         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_list_utils.cc",
    583         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_atom_cache.cc",
    584         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_server_pixel_buffer.cc",
    585         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_window_property.cc"
    586     ]
    587 
    588 if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "mips64":
    589 
    590     DEFINES["WEBRTC_USE_X11"] = True
    591 
    592     OS_LIBS += [
    593         "X11",
    594         "Xcomposite",
    595         "Xdamage",
    596         "Xext",
    597         "Xfixes",
    598         "Xrandr",
    599         "Xrender"
    600     ]
    601 
    602     UNIFIED_SOURCES += [
    603         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/mouse_cursor_monitor_x11.cc",
    604         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/screen_capturer_x11.cc",
    605         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/shared_x_display.cc",
    606         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_capturer_x11.cc",
    607         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_finder_x11.cc",
    608         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_list_utils.cc",
    609         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_atom_cache.cc",
    610         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_server_pixel_buffer.cc",
    611         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_window_property.cc"
    612     ]
    613 
    614 if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86":
    615 
    616     DEFINES["WEBRTC_USE_X11"] = True
    617 
    618     OS_LIBS += [
    619         "X11",
    620         "Xcomposite",
    621         "Xdamage",
    622         "Xext",
    623         "Xfixes",
    624         "Xrandr",
    625         "Xrender"
    626     ]
    627 
    628     UNIFIED_SOURCES += [
    629         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/mouse_cursor_monitor_x11.cc",
    630         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/screen_capturer_x11.cc",
    631         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/shared_x_display.cc",
    632         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_capturer_x11.cc",
    633         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_finder_x11.cc",
    634         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_list_utils.cc",
    635         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_atom_cache.cc",
    636         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_server_pixel_buffer.cc",
    637         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_window_property.cc"
    638     ]
    639 
    640 if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64":
    641 
    642     DEFINES["WEBRTC_USE_X11"] = True
    643 
    644     OS_LIBS += [
    645         "X11",
    646         "Xcomposite",
    647         "Xdamage",
    648         "Xext",
    649         "Xfixes",
    650         "Xrandr",
    651         "Xrender"
    652     ]
    653 
    654     UNIFIED_SOURCES += [
    655         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/mouse_cursor_monitor_x11.cc",
    656         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/screen_capturer_x11.cc",
    657         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/shared_x_display.cc",
    658         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_capturer_x11.cc",
    659         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_finder_x11.cc",
    660         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_list_utils.cc",
    661         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_atom_cache.cc",
    662         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_server_pixel_buffer.cc",
    663         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_window_property.cc"
    664     ]
    665 
    666 Library("desktop_capture_gn")