1 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
2 # vim: set filetype=python:
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 BUG_COMPONENT = ("Core", "WebRTC")
10 with Files("signaling/**"):
11 BUG_COMPONENT = ("Core", "WebRTC: Signaling")
13 include('/build/gyp.mozbuild')
14 include('/build/gn.mozbuild')
16 webrtc_non_unified_sources = [
17 'trunk/webrtc/common_audio/vad/vad_core.c', # Because of name clash in the kInitCheck variable
18 'trunk/webrtc/common_audio/vad/webrtc_vad.c', # Because of name clash in the kInitCheck variable
19 'trunk/webrtc/modules/audio_coding/acm2/codec_manager.cc', # Because of duplicate IsCodecRED/etc
20 'trunk/webrtc/modules/audio_coding/codecs/g722/g722_decode.c', # Because of name clash in the saturate function
21 'trunk/webrtc/modules/audio_coding/codecs/g722/g722_encode.c', # Because of name clash in the saturate function
22 'trunk/webrtc/modules/audio_coding/codecs/isac/fix/source/decode_plc.c', # Because of name clash in the exp2_Q10_T function
23 'trunk/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model.c', # Because of name clash in the exp2_Q10_T function
24 'trunk/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter.c', # Because of name clash in the kDampFilter variable
25 'trunk/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter_c.c', # Because of name clash in the kDampFilter variable
26 'trunk/webrtc/modules/audio_coding/neteq/audio_vector.cc', # Because of explicit template specializations
27 'trunk/webrtc/modules/audio_device/android/audio_manager.cc', # Because of TAG redefinition
28 'trunk/webrtc/modules/audio_device/android/audio_record_jni.cc', # Becuse of commonly named module static vars
29 'trunk/webrtc/modules/audio_device/android/audio_track_jni.cc', # Becuse of commonly named module static vars
30 'trunk/webrtc/modules/audio_device/android/opensles_player.cc', # Because of TAG redefinition
31 'trunk/webrtc/modules/audio_device/linux/audio_device_pulse_linux.cc', # Because of LATE()
32 'trunk/webrtc/modules/audio_device/linux/audio_mixer_manager_pulse_linux.cc',# Because of LATE()
33 'trunk/webrtc/modules/audio_device/win/audio_device_core_win.cc', # Because of ordering assumptions in strsafe.h
34 'trunk/webrtc/modules/audio_processing/aec/echo_cancellation.cc', # Because of conflicts over 'near' on windows
35 'trunk/webrtc/modules/audio_processing/aecm/aecm_core.cc', # Because of the PART_LEN2 define
36 'trunk/webrtc/modules/audio_processing/aecm/aecm_core_c.cc', # Because of the PART_LEN2 define
37 'trunk/webrtc/modules/audio_processing/aecm/aecm_core_mips.cc', # Because of the PART_LEN2 define
38 'trunk/webrtc/modules/audio_processing/aecm/aecm_core_neon.cc', # Because of the PART_LEN2 define
39 'trunk/webrtc/modules/audio_processing/aecm/echo_control_mobile.cc', # Because of the PART_LEN2 define
40 'trunk/webrtc/modules/audio_processing/agc/legacy/analog_agc.c', # Because of name clash in the kInitCheck variable
41 'trunk/webrtc/modules/audio_processing/beamformer/covariance_matrix_generator.cc', # Because of needing to define _USE_MATH_DEFINES before including <cmath>
42 'trunk/webrtc/modules/audio_processing/beamformer/covariance_matrix_generator.cc', # Because of needing to define _USE_MATH_DEFINES before including <cmath>
43 'trunk/webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.cc', # Because of needing to define _USE_MATH_DEFINES before including <cmath>
44 'trunk/webrtc/modules/audio_processing/echo_cancellation_impl.cc', # Because of name clash in the MapError function
45 'trunk/webrtc/modules/audio_processing/echo_control_mobile_impl.cc', # Because of name clash in the MapError function
46 'trunk/webrtc/modules/audio_processing/echo_detector/normalized_covariance_estimator.cc', # Because of kAlpha
47 'trunk/webrtc/modules/audio_processing/gain_control_impl.cc', # Because of name clash in the Handle typedef
48 'trunk/webrtc/modules/audio_processing/noise_suppression_impl.cc', # Because of name clash in the Handle typedef
49 'trunk/webrtc/modules/audio_processing/rms_level.cc', # Because of name clash in the kMinLevel variable
50 'trunk/webrtc/modules/congestion_controller/trendline_estimator.cc', # Because of name clash in kDeltaCounterMax
51 'trunk/webrtc/modules/desktop_capture/win/screen_capturer_win_gdi.cc', # Because base/logging.h uses #ifndef LOG before defining anything
52 'trunk/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.cc', # Because of duplicate definitions of static consts against remote_bitrate_estimator_abs_send_time.cc
53 'trunk/webrtc/modules/rtp_rtcp/source/flexfec_receiver.cc', # Because of identically named functions and vars between flexfec_receiver.cc and flexfec_sender.cc in an anonymous namespaces
54 'trunk/webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbn.cc', # Because of identically named functions and vars between tmmbr.cc and tmmbn.cc in an anonymous namespaces
55 'trunk/webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbr.cc', # Because of identically named functions and vars between tmmbr.cc and tmmbn.cc in an anonymous namespaces
56 'trunk/webrtc/modules/rtp_rtcp/source/ulpfec_generator.cc', # Because of identically named constant kRedForFecHeaderLength in an anonymous namespace
57 'trunk/webrtc/modules/video_capture/windows/device_info_ds.cc', # Because of the MEDIASUBTYPE_HDYC variable
58 'trunk/webrtc/modules/video_capture/windows/help_functions_ds.cc', # Because of initguid.h
59 'trunk/webrtc/modules/video_capture/windows/sink_filter_ds.cc', # Because of the MEDIASUBTYPE_HDYC variable and initguid.h
60 'trunk/webrtc/video/overuse_frame_detector.cc', # Because of name clash with call_stats.cc on kWeightFactor
63 # Set gyp vars that webrtc needs when building under various analysis tools.
64 # Primarily this prevents webrtc from setting NVALGRIND and breaking builds.
65 gyp_vars_copy = gyp_vars.copy()
66 if CONFIG['MOZ_VALGRIND']:
67 gyp_vars_copy.update(build_for_tool="memcheck")
68 elif CONFIG['MOZ_ASAN']:
69 gyp_vars_copy.update(build_for_tool="asan")
70 elif CONFIG['MOZ_TSAN']:
71 gyp_vars_copy.update(build_for_tool="tsan")
73 GN_DIRS += ['trunk/webrtc']
75 gn_vars_copy = gn_vars.copy()
77 GN_DIRS['trunk/webrtc'].variables = gn_vars_copy
78 GN_DIRS['trunk/webrtc'].mozilla_flags = [
83 GN_DIRS['trunk/webrtc'].gn_target = '//:webrtc'
84 # We allow warnings for third-party code that can be updated from upstream.
85 GN_DIRS['trunk/webrtc'].sandbox_vars['COMPILE_FLAGS'] = {'WARNINGS_AS_ERRORS': []}
86 GN_DIRS['trunk/webrtc'].sandbox_vars['FINAL_LIBRARY'] = 'webrtc'
87 GN_DIRS['trunk/webrtc'].non_unified_sources += webrtc_non_unified_sources
89 if CONFIG['MOZ_WEBRTC_SIGNALING']:
91 'signaling/src/common',
93 'signaling/src/media-conduit',
94 'signaling/src/mediapipeline',
95 'signaling/src/peerconnection',
98 GYP_DIRS += ['trunk/third_party/gflags']
99 GYP_DIRS['trunk/third_party/gflags'].input = 'trunk/third_party/gflags/gflags.gyp'
100 GYP_DIRS['trunk/third_party/gflags'].variables = gyp_vars_copy
101 GYP_DIRS['trunk/third_party/gflags'].sandbox_vars['COMPILE_FLAGS'] = {'WARNINGS_AS_ERRORS': []}
103 # Avoid warnings from third-party code that we can not modify.
104 if CONFIG['CC_TYPE'] == 'clang-cl':
105 CXXFLAGS += ['-Wno-invalid-source-encoding']
107 if CONFIG['ENABLE_TESTS']:
113 # Add libFuzzer configuration directives
114 include('/tools/fuzzing/libfuzzer-config.mozbuild')
115 if CONFIG['FUZZING_INTERFACES']: