moz.build 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
  2. # This Source Code Form is subject to the terms of the Mozilla Public
  3. # License, v. 2.0. If a copy of the MPL was not distributed with this
  4. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  5. include('/build/gyp.mozbuild')
  6. webrtc_non_unified_sources = [
  7. 'trunk/webrtc/common_audio/vad/vad_core.c', # Because of name clash in the kInitCheck variable
  8. 'trunk/webrtc/common_audio/vad/webrtc_vad.c', # Because of name clash in the kInitCheck variable
  9. 'trunk/webrtc/modules/audio_coding/codecs/g722/g722_decode.c', # Because of name clash in the saturate function
  10. 'trunk/webrtc/modules/audio_coding/codecs/g722/g722_encode.c', # Because of name clash in the saturate function
  11. 'trunk/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter.c', # Because of name clash in the kDampFilter variable
  12. 'trunk/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter_c.c', # Because of name clash in the kDampFilter variable
  13. 'trunk/webrtc/modules/audio_coding/main/acm2/codec_manager.cc', # Because of duplicate IsCodecRED/etc
  14. 'trunk/webrtc/modules/audio_coding/neteq/audio_vector.cc', # Because of explicit template specializations
  15. 'trunk/webrtc/modules/audio_device/android/audio_record_jni.cc', # Becuse of commonly named module static vars
  16. 'trunk/webrtc/modules/audio_device/android/audio_track_jni.cc', # Becuse of commonly named module static vars
  17. 'trunk/webrtc/modules/audio_device/linux/audio_device_pulse_linux.cc', # Because of LATE()
  18. 'trunk/webrtc/modules/audio_device/linux/audio_mixer_manager_pulse_linux.cc',# Because of LATE()
  19. 'trunk/webrtc/modules/audio_device/opensl/opensles_input.cc', # Because of name clash in the kOption variable
  20. 'trunk/webrtc/modules/audio_device/opensl/opensles_output.cc', # Because of name clash in the kOption variable
  21. 'trunk/webrtc/modules/audio_device/opensl/single_rw_fifo.cc', # Because of name clash with #define FF
  22. 'trunk/webrtc/modules/audio_device/win/audio_device_core_win.cc', # Because of ordering assumptions in strsafe.h
  23. 'trunk/webrtc/modules/audio_processing/aec/aec_core.c', # Because of name clash in the ComfortNoise function
  24. 'trunk/webrtc/modules/audio_processing/aecm/aecm_core.c', # Because of name clash in the ComfortNoise function
  25. 'trunk/webrtc/modules/audio_processing/aecm/echo_control_mobile.c', # Because of name clash in the kInitCheck variable
  26. 'trunk/webrtc/modules/audio_processing/agc/histogram.cc', # Because of duplicate definition of static consts with pitch_based_vad.cc
  27. 'trunk/webrtc/modules/audio_processing/agc/legacy/analog_agc.c', # Because of name clash in the kInitCheck variable
  28. 'trunk/webrtc/modules/audio_processing/beamformer/covariance_matrix_generator.cc', # Because of needing to define _USE_MATH_DEFINES before including <cmath>
  29. 'trunk/webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.cc', # Because of needing to define _USE_MATH_DEFINES before including <cmath>
  30. 'trunk/webrtc/modules/audio_processing/echo_cancellation_impl.cc', # Because of name clash in the MapError function
  31. 'trunk/webrtc/modules/audio_processing/echo_control_mobile_impl.cc', # Because of name clash in the MapError function
  32. 'trunk/webrtc/modules/audio_processing/gain_control_impl.cc', # Because of name clash in the Handle typedef
  33. 'trunk/webrtc/modules/audio_processing/high_pass_filter_impl.cc', # Because of name clash in the Handle typedef
  34. 'trunk/webrtc/modules/audio_processing/noise_suppression_impl.cc', # Because of name clash in the Handle typedef
  35. 'trunk/webrtc/modules/remote_bitrate_estimator/mimd_rate_control.cc', # Because of duplicate definitions of static consts against aimd_rate_control.cc
  36. '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
  37. 'trunk/webrtc/modules/video_capture/windows/device_info_ds.cc', # Because of the MEDIASUBTYPE_HDYC variable
  38. 'trunk/webrtc/modules/video_capture/windows/help_functions_ds.cc', # Because of initguid.h
  39. 'trunk/webrtc/modules/video_capture/windows/sink_filter_ds.cc', # Because of the MEDIASUBTYPE_HDYC variable and initguid.h
  40. 'trunk/webrtc/video_engine/overuse_frame_detector.cc', # Because of name clash with call_stats.cc on kWeightFactor
  41. ]
  42. GYP_DIRS += ['trunk']
  43. GYP_DIRS['trunk'].input = 'trunk/peerconnection.gyp'
  44. GYP_DIRS['trunk'].variables = gyp_vars
  45. # We allow warnings for third-party code that can be updated from upstream.
  46. GYP_DIRS['trunk'].sandbox_vars['ALLOW_COMPILER_WARNINGS'] = True
  47. GYP_DIRS['trunk'].sandbox_vars['FINAL_LIBRARY'] = 'webrtc'
  48. GYP_DIRS['trunk'].non_unified_sources += webrtc_non_unified_sources
  49. if CONFIG['MOZ_WEBRTC_SIGNALING']:
  50. GYP_DIRS += ['signaling']
  51. GYP_DIRS['signaling'].input = 'signaling/signaling.gyp'
  52. GYP_DIRS['signaling'].variables = gyp_vars.copy()
  53. GYP_DIRS['signaling'].variables.update(
  54. build_for_test=0,
  55. build_for_standalone=0
  56. )
  57. GYP_DIRS['signaling'].sandbox_vars['FINAL_LIBRARY'] = 'xul'
  58. # Excluded for various symbol conflicts
  59. signaling_non_unified_sources = [
  60. 'signaling/src/common/browser_logging/CSFLog.cpp',
  61. 'signaling/src/jsep/JsepSessionImpl.cpp',
  62. 'signaling/src/media-conduit/AudioConduit.cpp',
  63. 'signaling/src/media-conduit/CodecStatistics.cpp',
  64. 'signaling/src/media-conduit/MediaCodecVideoCodec.cpp',
  65. 'signaling/src/media-conduit/VideoConduit.cpp',
  66. 'signaling/src/media-conduit/WebrtcMediaCodecVP8VideoCodec.cpp',
  67. 'signaling/src/mediapipeline/MediaPipeline.cpp',
  68. 'signaling/src/mediapipeline/MediaPipelineFilter.cpp',
  69. 'signaling/src/mediapipeline/SrtpFlow.cpp',
  70. 'signaling/src/peerconnection/MediaPipelineFactory.cpp',
  71. 'signaling/src/peerconnection/MediaStreamList.cpp',
  72. 'signaling/src/peerconnection/PeerConnectionCtx.cpp',
  73. 'signaling/src/peerconnection/PeerConnectionImpl.cpp',
  74. 'signaling/src/peerconnection/PeerConnectionMedia.cpp',
  75. 'signaling/src/peerconnection/WebrtcGlobalInformation.cpp',
  76. 'signaling/src/sdp/sipcc/cpr_string.c',
  77. 'signaling/src/sdp/sipcc/sdp_access.c',
  78. 'signaling/src/sdp/sipcc/sdp_attr.c',
  79. 'signaling/src/sdp/sipcc/sdp_attr_access.c',
  80. 'signaling/src/sdp/sipcc/sdp_base64.c',
  81. 'signaling/src/sdp/sipcc/sdp_config.c',
  82. 'signaling/src/sdp/sipcc/sdp_main.c',
  83. 'signaling/src/sdp/sipcc/sdp_services_unix.c',
  84. 'signaling/src/sdp/sipcc/sdp_token.c',
  85. 'signaling/src/sdp/sipcc/sdp_utils.c',
  86. ]
  87. GYP_DIRS['signaling'].sandbox_vars['ALLOW_COMPILER_WARNINGS'] = True
  88. GYP_DIRS['signaling'].non_unified_sources += signaling_non_unified_sources
  89. if CONFIG['_MSC_VER']:
  90. # Avoid warnings from third-party code that we can not modify.
  91. if CONFIG['CLANG_CL']:
  92. CXXFLAGS += ['-Wno-invalid-source-encoding']
  93. else:
  94. CXXFLAGS += ['-validate-charset-']
  95. GYP_DIRS += ['trunk/testing']
  96. GYP_DIRS['trunk/testing'].input = 'trunk/testing/gtest.gyp'
  97. GYP_DIRS['trunk/testing'].variables = gyp_vars
  98. # We allow warnings for third-party code that can be updated from upstream.
  99. GYP_DIRS['trunk/testing'].sandbox_vars['ALLOW_COMPILER_WARNINGS'] = True
  100. GYP_DIRS['trunk/testing'].non_unified_sources += webrtc_non_unified_sources
  101. if CONFIG['MOZ_WEBRTC_SIGNALING']:
  102. GYP_DIRS += ['signalingtest']
  103. GYP_DIRS['signalingtest'].input = 'signaling/signaling.gyp'
  104. GYP_DIRS['signalingtest'].variables = gyp_vars.copy()
  105. GYP_DIRS['signalingtest'].variables.update(
  106. build_for_test=1,
  107. moz_webrtc_mediacodec=0,
  108. build_for_standalone=0
  109. )
  110. GYP_DIRS['signalingtest'].sandbox_vars['ALLOW_COMPILER_WARNINGS'] = True
  111. GYP_DIRS['signalingtest'].non_unified_sources += signaling_non_unified_sources