dom/media/webrtc/moz.build
author Masatoshi Kimura <VYV03354@nifty.ne.jp>
Tue, 31 Jul 2018 22:10:07 +0900
changeset 485348 997fd8419a4b28cdaaf3263e88dcad585ccfb101
parent 472118 2c09bc9c0eb521ca8441c923a1b64bff1c1d96b4
child 488000 eec51e192b5dbb44d4f472a3cb2da8ff7f5ad577
permissions -rw-r--r--
Bug 1090497 - Re-enable warnings as errors on clang-cl. r=froydnj

# -*- 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/.
include('/media/webrtc/webrtc.mozbuild')

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

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

XPIDL_MODULE = 'content_webrtc'

EXPORTS += [
    'AllocationHandle.h',
    'MediaEngine.h',
    'MediaEngineDefault.h',
    'MediaEnginePrefs.h',
    'MediaEngineSource.h',
    'MediaTrackConstraints.h',
    'SineWaveGenerator.h',
]

if CONFIG['MOZ_WEBRTC']:
    EXPORTS += ['MediaEngineRemoteVideoSource.h',
                'MediaEngineWebRTC.h']
    EXPORTS.mozilla.dom += [ 'RTCIdentityProviderRegistrar.h' ]
    UNIFIED_SOURCES += [
        'MediaEngineRemoteVideoSource.cpp',
        'MediaEngineTabVideoSource.cpp',
        'MediaEngineWebRTCAudio.cpp',
        'RTCCertificate.cpp',
        'RTCIdentityProviderRegistrar.cpp',
    ]
    # MediaEngineWebRTC.cpp needs to be built separately.
    SOURCES += [
        'MediaEngineWebRTC.cpp',
    ]
    LOCAL_INCLUDES += [
        '..',
        '/dom/base',
        '/dom/media',
        '/media/libyuv/libyuv/include',
        '/media/webrtc/signaling/src/common',
        '/media/webrtc/signaling/src/common/browser_logging',
        '/media/webrtc/trunk'
    ]

XPIDL_SOURCES += [
    'nsITabSource.idl'
]

UNIFIED_SOURCES += [
    'MediaEngineDefault.cpp',
    'MediaEngineSource.cpp',
    'MediaTrackConstraints.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['CC_TYPE'] in ('clang', 'clang-cl', 'gcc'):
    CXXFLAGS += [
        '-Wno-error=attributes',
        '-Wno-error=shadow',
    ]

DEFINES['TRACING'] = True
FINAL_LIBRARY = 'xul'

if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
    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__'

if CONFIG['MOZ_ASAN'] and CONFIG['CC_TYPE'] == 'clang-cl':
    AllowCompilerWarnings()  # workaround for bug 1306642