dom/media/webrtc/moz.build
author Gregory Szorc <gps@mozilla.com>
Mon, 14 Mar 2016 16:05:06 -0700
changeset 340050 deb1dba5449d15c6b697a02f688d4b19339161c6
parent 309817 ae32ad44ce1c048258a881dbaa7727def08c53a4
child 340627 af4e0baeb0417bbf294f63b512d1bf3794878cd5
child 355667 bddc5da674d489fd62811c7233947c0660cd686d
child 367194 2572c0758dd4377a832c1e8ed16522dc829634ad
permissions -rw-r--r--
Bug 1256482 - Disable C4312 to unblock compilation on VS2015; r?jesup As part of unblocking building with VS2015u1 in automation, I'm mass disabling compiler warnings that are turned into errors. This is not the preferred mechanism to fix compilation warnings, of course. Given that the warning is in WebRTC which is third party code, there isn't much we can do about the warning. However, Google is building Chrome with Visual Studio 2015, so I wouldn't be surprised if this were fixed upstream or will be fixed upstream. Then again, we allow warnings when building WebRTC. So perhaps not. MozReview-Commit-ID: G6JP9fkCzfn

# -*- Mode: python; c-basic-offset: 4; 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/.

with Files('*'):
    BUG_COMPONENT = ('Core', 'WebRTC: Audio/Video')

with Files('PeerIdentity.*'):
    BUG_COMPONENT = ('Core', 'WebRTC: Signaling')

XPIDL_MODULE = 'content_webrtc'

EXPORTS += [
    'MediaEngine.h',
    'MediaEngineCameraVideoSource.h',
    'MediaEngineDefault.h',
    'MediaTrackConstraints.h',
]

if CONFIG['MOZ_WEBRTC']:
    if CONFIG['OS_TARGET'] == 'WINNT':
        DEFINES['WEBRTC_WIN'] = True
    else:
        DEFINES['WEBRTC_POSIX'] = True
    EXPORTS += ['AudioOutputObserver.h',
                'MediaEngineRemoteVideoSource.h',
                'MediaEngineWebRTC.h']
    EXPORTS.mozilla.dom += [ 'RTCIdentityProviderRegistrar.h' ]
    UNIFIED_SOURCES += [
        'MediaEngineCameraVideoSource.cpp',
        'MediaEngineRemoteVideoSource.cpp',
        'MediaEngineTabVideoSource.cpp',
        'MediaEngineWebRTCAudio.cpp',
        'MediaTrackConstraints.cpp',
        'RTCCertificate.cpp',
        'RTCIdentityProviderRegistrar.cpp',
    ]
    # MediaEngineWebRTC.cpp needs to be built separately.
    SOURCES += [
        'MediaEngineWebRTC.cpp',
    ]
    LOCAL_INCLUDES += [
        '/dom/base',
        '/dom/camera',
        '/media/libyuv/include',
        '/media/webrtc/signaling/src/common',
        '/media/webrtc/signaling/src/common/browser_logging',
        '/media/webrtc/trunk',
    ]
    # Gonk camera source.
    if CONFIG['MOZ_B2G_CAMERA'] and CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
        EXPORTS += [
            'GonkCameraImage.h',
            'MediaEngineGonkVideoSource.h',
        ]
        UNIFIED_SOURCES += [
            'GonkCameraImage.cpp',
            'MediaEngineGonkVideoSource.cpp',
        ]

XPIDL_SOURCES += [
    'nsITabSource.idl'
]

UNIFIED_SOURCES += [
    'MediaEngineDefault.cpp',
    'PeerIdentity.cpp',
]

EXPORTS.mozilla += [
    'PeerIdentity.h',
]
EXPORTS.mozilla.dom += [
    'RTCCertificate.h',
]

include('/ipc/chromium/chromium-config.mozbuild')

# Suppress some GCC/clang warnings being treated as errors:
#  - about attributes on forward declarations for types that are already
#    defined, which complains about important MOZ_EXPORT attributes for
#    android API types
if CONFIG['GNU_CC'] or CONFIG['CLANG_CL']:
    CXXFLAGS += [
        '-Wno-error=attributes'
    ]

FINAL_LIBRARY = 'xul'

if CONFIG['_MSC_VER']:
    CXXFLAGS += [
        '-wd4275', # non dll-interface class used as base for dll-interface class
        '-wd4312', # This is intended as a temporary hack to support building with VS2015
                   # 'reinterpret_cast': conversion from 'DWORD' to 'HANDLE' of greater size
    ]
    DEFINES['__PRETTY_FUNCTION__'] = '__FUNCSIG__'