Bug 1382182 - Build signaling common using moz.build; r?ted,jesup draft
authorDan Minor <dminor@mozilla.com>
Mon, 24 Jul 2017 10:59:20 -0400
changeset 649101 eaf6cc448c941245ee7df4962f89ca8e5be502c3
parent 649100 bd7c554bcfe1f949eac5489642a638a6e39422bf
child 727004 62db1a56861c89db858c832016830c1631988d97
push id74953
push userbmo:dminor@mozilla.com
push dateFri, 18 Aug 2017 16:55:41 +0000
reviewersted, jesup
bugs1382182
milestone57.0a1
Bug 1382182 - Build signaling common using moz.build; r?ted,jesup MozReview-Commit-ID: FSqL5enNAZC
media/webrtc/moz.build
media/webrtc/signaling/moz.build
media/webrtc/signaling/signaling.gyp
media/webrtc/signaling/src/common/browser_logging/moz.build
media/webrtc/signaling/src/common/moz.build
media/webrtc/signaling/src/common/time_profiling/moz.build
--- a/media/webrtc/moz.build
+++ b/media/webrtc/moz.build
@@ -72,54 +72,16 @@ GYP_DIRS['trunk'].input = 'trunk/peercon
 GYP_DIRS['trunk'].variables = gyp_vars_copy
 # We allow warnings for third-party code that can be updated from upstream.
 GYP_DIRS['trunk'].sandbox_vars['ALLOW_COMPILER_WARNINGS'] = True
 GYP_DIRS['trunk'].sandbox_vars['FINAL_LIBRARY'] = 'webrtc'
 GYP_DIRS['trunk'].non_unified_sources += webrtc_non_unified_sources
 
 if CONFIG['MOZ_WEBRTC_SIGNALING']:
     DIRS += ['signaling']
-    GYP_DIRS += ['signaling']
-    GYP_DIRS['signaling'].input = 'signaling/signaling.gyp'
-    GYP_DIRS['signaling'].variables = gyp_vars_copy.copy()
-    GYP_DIRS['signaling'].variables.update(
-        build_for_test=0,
-        build_for_standalone=0
-    )
-    GYP_DIRS['signaling'].sandbox_vars['FINAL_LIBRARY'] = 'xul'
-    # Excluded for various symbol conflicts
-    signaling_non_unified_sources = [
-        'signaling/src/common/browser_logging/CSFLog.cpp',
-        'signaling/src/jsep/JsepSessionImpl.cpp',
-        'signaling/src/media-conduit/AudioConduit.cpp',
-        'signaling/src/media-conduit/MediaCodecVideoCodec.cpp',
-        'signaling/src/media-conduit/VideoConduit.cpp',
-        'signaling/src/media-conduit/WebrtcMediaCodecVP8VideoCodec.cpp',
-        'signaling/src/mediapipeline/MediaPipeline.cpp',
-        'signaling/src/mediapipeline/MediaPipelineFilter.cpp',
-        'signaling/src/mediapipeline/SrtpFlow.cpp',
-        'signaling/src/peerconnection/MediaPipelineFactory.cpp',
-        'signaling/src/peerconnection/MediaStreamList.cpp',
-        'signaling/src/peerconnection/PeerConnectionCtx.cpp',
-        'signaling/src/peerconnection/PeerConnectionImpl.cpp',
-        'signaling/src/peerconnection/PeerConnectionMedia.cpp',
-        'signaling/src/peerconnection/WebrtcGlobalInformation.cpp',
-        'signaling/src/sdp/sipcc/cpr_string.c',
-        'signaling/src/sdp/sipcc/sdp_access.c',
-        'signaling/src/sdp/sipcc/sdp_attr.c',
-        'signaling/src/sdp/sipcc/sdp_attr_access.c',
-        'signaling/src/sdp/sipcc/sdp_base64.c',
-        'signaling/src/sdp/sipcc/sdp_config.c',
-        'signaling/src/sdp/sipcc/sdp_main.c',
-        'signaling/src/sdp/sipcc/sdp_services_unix.c',
-        'signaling/src/sdp/sipcc/sdp_token.c',
-        'signaling/src/sdp/sipcc/sdp_utils.c',
-    ]
-
-    GYP_DIRS['signaling'].non_unified_sources += signaling_non_unified_sources
 
     GYP_DIRS += ['trunk/third_party/gflags']
     GYP_DIRS['trunk/third_party/gflags'].input = 'trunk/third_party/gflags/gflags.gyp'
     GYP_DIRS['trunk/third_party/gflags'].variables = gyp_vars_copy
     GYP_DIRS['trunk/third_party/gflags'].sandbox_vars['ALLOW_COMPILER_WARNINGS'] = True
 
     if CONFIG['_MSC_VER']:
         # Avoid warnings from third-party code that we can not modify.
--- a/media/webrtc/signaling/moz.build
+++ b/media/webrtc/signaling/moz.build
@@ -1,12 +1,13 @@
 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 DIRS += [
+    'src/common',
     'src/jsep',
     'src/media-conduit',
     'src/mediapipeline',
     'src/peerconnection',
     'src/sdp',
 ]
deleted file mode 100644
--- a/media/webrtc/signaling/signaling.gyp
+++ /dev/null
@@ -1,273 +0,0 @@
-# Copyright (c) 2011, The WebRTC project authors. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#  *  Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-#
-#  *  Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in
-#     the documentation and/or other materials provided with the
-#     distribution.
-#
-#  *  Neither the name of Google nor the names of its contributors may
-#     be used to endorse or promote products derived from this software
-#     without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-# Indent 2 spaces, no tabs.
-#
-#
-# sip.gyp - a library for SIP
-#
-
-{
-  'variables': {
-    'chromium_code': 1,
-  },
-
-  'target_defaults': {
-    'conditions': [
-      ['moz_widget_toolkit_gonk==1', {
-        'defines' : [
-          'WEBRTC_GONK',
-       ],
-      }],
-    ],
-  },
-
-  'targets': [
-
-    #
-    # ECC
-    #
-    {
-      'target_name': 'ecc',
-      'type': 'static_library',
-
-      #
-      # INCLUDES
-      #
-      'include_dirs': [
-        '..',
-        './src',
-        './src/common',
-        './src/common/browser_logging',
-        './src/common/time_profiling',
-        './src/media',
-        './src/media-conduit',
-        './src/mediapipeline',
-        './src/peerconnection',
-        '../../../dom/base',
-        '../../../dom/media',
-        '../../../dom/media/platforms',
-        '../../../media/mtransport',
-        '../trunk',
-        '../../libyuv/libyuv/include',
-        '../../mtransport/third_party/nrappkit/src/util/libekr',
-      ],
-
-      #
-      # DEPENDENCIES
-      #
-      'dependencies': [
-      ],
-
-      'export_dependent_settings': [
-      ],
-
-
-      #
-      # SOURCES
-      #
-      'sources': [
-        # Common
-        './src/common/CommonTypes.h',
-        './src/common/csf_common.h',
-        './src/common/NullDeleter.h',
-        './src/common/PtrVector.h',
-        './src/common/Wrapper.h',
-        './src/common/NullTransport.h',
-        './src/common/YuvStamper.cpp',
-        # Browser Logging
-        './src/common/browser_logging/CSFLog.cpp',
-        './src/common/browser_logging/CSFLog.h',
-        './src/common/browser_logging/WebRtcLog.cpp',
-        './src/common/browser_logging/WebRtcLog.h',
-        # Browser Logging
-        './src/common/time_profiling/timecard.c',
-        './src/common/time_profiling/timecard.h',
-      ],
-
-      #
-      # DEFINES
-      #
-
-      'defines' : [
-        'LOG4CXX_STATIC',
-        '_NO_LOG4CXX',
-        'USE_SSLEAY',
-        '_CPR_USE_EXTERNAL_LOGGER',
-        'WEBRTC_RELATIVE_PATH',
-        'HAVE_WEBRTC_VIDEO',
-        'HAVE_WEBRTC_VOICE',
-        'HAVE_STDINT_H=1',
-        'HAVE_STDLIB_H=1',
-        'HAVE_UINT8_T=1',
-        'HAVE_UINT16_T=1',
-        'HAVE_UINT32_T=1',
-        'HAVE_UINT64_T=1',
-      ],
-
-      'cflags_mozilla': [
-        '$(NSPR_CFLAGS)',
-        '$(NSS_CFLAGS)',
-        '$(MOZ_PIXMAN_CFLAGS)',
-      ],
-
-
-      #
-      # Conditionals
-      #
-      'conditions': [
-        ['moz_webrtc_mediacodec==1', {
-          'include_dirs': [
-            '../../../widget/android',
-          ],
-          'sources': [
-            './src/media-conduit/MediaCodecVideoCodec.h',
-            './src/media-conduit/WebrtcMediaCodecVP8VideoCodec.h',
-            './src/media-conduit/MediaCodecVideoCodec.cpp',
-            './src/media-conduit/WebrtcMediaCodecVP8VideoCodec.cpp',
-          ],
-          'defines' : [
-            'MOZ_WEBRTC_MEDIACODEC',
-          ],
-        }],
-        ['build_for_test!=0', {
-          'include_dirs': [
-            './test'
-          ],
-          'defines' : [
-            'NO_CHROMIUM_LOGGING',
-            'USE_FAKE_PCOBSERVER',
-          ],
-        }],
-        ['build_for_standalone!=0', {
-          'include_dirs': [
-            './test'
-          ],
-          'defines' : [
-            'NO_CHROMIUM_LOGGING',
-            'USE_FAKE_PCOBSERVER',
-          ],
-        }],
-        # See webrtc/base/task_queue.h
-        ['OS!="mac" and OS!="ios" and OS!="win"', {
-          'defines': [
-            'WEBRTC_BUILD_LIBEVENT',
-          ],
-        }],
-        ['(OS=="linux") or (OS=="android")', {
-          'include_dirs': [
-          ],
-
-          'defines': [
-            'OS_LINUX',
-            'SIP_OS_LINUX',
-            'WEBRTC_POSIX',
-            '_GNU_SOURCE',
-            'LINUX',
-            'GIPS_VER=3510',
-            'SECLIB_OPENSSL',
-          ],
-
-          'cflags_mozilla': [
-          ],
-        }],
-        ['OS=="android" or moz_widget_toolkit_gonk==1', {
-          'cflags_mozilla': [
-            # This warning complains about important MOZ_EXPORT attributes
-            # on forward declarations for Android API types.
-            '-Wno-error=attributes',
-          ],
-        }],
-        ['OS=="win"', {
-          'include_dirs': [
-          ],
-          'defines': [
-            'OS_WIN',
-            'SIP_OS_WINDOWS',
-            'WEBRTC_WIN',
-            'WIN32',
-            'GIPS_VER=3480',
-            'SIPCC_BUILD',
-            'HAVE_WINSOCK2_H'
-          ],
-
-          'cflags_mozilla': [
-          ],
-        }],
-        ['os_bsd==1', {
-          'include_dirs': [
-          ],
-          'defines': [
-            # avoiding pointless ifdef churn
-            'WEBRTC_POSIX',
-            'SIP_OS_OSX',
-            'OSX',
-            'SECLIB_OPENSSL',
-          ],
-
-          'cflags_mozilla': [
-          ],
-        }],
-        ['OS=="mac" or OS=="ios"', {
-          'include_dirs': [
-          ],
-          'defines': [
-            'WEBRTC_POSIX',
-            'WEBRTC_MAC',
-            'OS_MACOSX',
-            'SIP_OS_OSX',
-            'OSX',
-            '_FORTIFY_SOURCE=2',
-          ],
-
-          'cflags_mozilla': [
-          ],
-        }],
-        ['clang == 1', {
-          'cflags_mozilla': [
-            '-Wno-inconsistent-missing-override',
-            '-Wno-macro-redefined',
-         ],
-        }],
-        ['libfuzzer == 1', {
-          'cflags_mozilla': [
-            '-fsanitize-coverage=trace-pc-guard',
-         ],
-        }],
-      ],
-    },
-  ],
-}
-
-# Local Variables:
-# tab-width:2
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=2 shiftwidth=2:
new file mode 100644
--- /dev/null
+++ b/media/webrtc/signaling/src/common/browser_logging/moz.build
@@ -0,0 +1,19 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+LOCAL_INCLUDES += [
+    '/media/webrtc/trunk',
+    '/media/webrtc/trunk/webrtc',
+]
+
+UNIFIED_SOURCES += [
+    'CSFLog.cpp',
+    'WebRtcLog.cpp',
+]
+
+FINAL_LIBRARY = 'xul'
+
+if CONFIG['GNU_CXX']:
+    CXXFLAGS += ['-Wno-shadow']
new file mode 100644
--- /dev/null
+++ b/media/webrtc/signaling/src/common/moz.build
@@ -0,0 +1,22 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+DIRS += [
+    'browser_logging',
+    'time_profiling',
+]
+
+LOCAL_INCLUDES += [
+    '/media/mtransport/third_party/nrappkit/src/util/libekr',
+]
+
+UNIFIED_SOURCES += [
+    'YuvStamper.cpp'
+]
+
+FINAL_LIBRARY = 'xul'
+
+if CONFIG['GNU_CXX']:
+    CXXFLAGS += ['-Wno-shadow']
new file mode 100644
--- /dev/null
+++ b/media/webrtc/signaling/src/common/time_profiling/moz.build
@@ -0,0 +1,13 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+UNIFIED_SOURCES += [
+    'timecard.c'
+]
+
+FINAL_LIBRARY = 'xul'
+
+if CONFIG['GNU_CXX']:
+    CXXFLAGS += ['-Wno-shadow']