Bug 1386164 - Part 2. Use MOZ_SYSTEM_LIBEVENT for webrtc. r=jesup
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Thu, 03 Aug 2017 13:28:25 +0900
changeset 621043 e1ab8bf0905dba63b4449344bad11b109d036747
parent 621042 8ed89673594e26a7dc3914346be5778eddb15163
child 621044 6f029af6aa34b8cef8ad7a192b5bcec534bce8f3
push id72232
push userbmo:emilio+bugs@crisal.io
push dateFri, 04 Aug 2017 07:44:27 +0000
reviewersjesup
bugs1386164
milestone57.0a1
Bug 1386164 - Part 2. Use MOZ_SYSTEM_LIBEVENT for webrtc. r=jesup GYP of WebRTC should reference MOZ_SYSTEM_LIBEVENT values if available. MozReview-Commit-ID: CshsPrRidM8
build/gyp.mozbuild
media/webrtc/trunk/gtest/moz.build
media/webrtc/trunk/webrtc/base/base.gyp
--- a/build/gyp.mozbuild
+++ b/build/gyp.mozbuild
@@ -38,17 +38,16 @@ gyp_vars.update({
     'build_libyuv': 0,
     'build_libvpx': 0,
     'build_libevent': 0,
     'build_ssl': 0,
     'build_json': 0,
     'build_icu': 0,
     'build_opus': 0,
     'libyuv_dir': '/media/libyuv/libyuv',
-    'libevent_dir': '/ipc/chromium/src/third_party/libevent',
     'yuv_disable_avx2': 0 if CONFIG['HAVE_X86_AVX2'] else 1,
     # don't use openssl
     'use_openssl': 0,
     # Must match build/gyp.mozbuild WEBRTC_BUILD_LIBEVENT
     #'enable_libevent': 0, default according to OS
 
     'debug': 1 if CONFIG['DEBUG'] else 0,
 
@@ -119,8 +118,11 @@ if CONFIG['INTEL_ARCHITECTURE']:
     if not CONFIG['HAVE_TOOLCHAIN_SUPPORT_MSSSE3'] or not CONFIG['HAVE_TOOLCHAIN_SUPPORT_MSSE4_1']:
         gyp_vars['yuv_disable_asm'] = 1
 
 if CONFIG['MACOS_SDK_DIR']:
     gyp_vars['mac_sdk_path'] = CONFIG['MACOS_SDK_DIR']
 
 if not CONFIG['MOZ_SYSTEM_LIBVPX']:
     gyp_vars['libvpx_dir'] =  '/media/libvpx/libvpx'
+
+if not CONFIG['MOZ_SYSTEM_LIBEVENT']:
+    gyp_vars['libevent_dir'] = '/ipc/chromium/src/third_party/libevent' 
--- a/media/webrtc/trunk/gtest/moz.build
+++ b/media/webrtc/trunk/gtest/moz.build
@@ -59,19 +59,22 @@ if CONFIG['OS_TARGET'] in ['Darwin', 'Li
         DEFINES['WEBRTC_LINUX'] = True
         DEFINES['WEBRTC_POSIX'] = True
 
         LOCAL_INCLUDES += [
             '../third_party/gflags/gen/posix/include',
             '../third_party/gflags/gen/posix/include/private',
         ]
 
-        USE_LIBS += [
-            'libevent',
-        ]
+        if CONFIG['MOZ_SYSTEM_LIBEVENT']:
+            OS_LIBS += CONFIG['MOZ_LIBEVENT_LIBS']
+        else:
+            USE_LIBS += [
+                'libevent',
+            ]
 
         OS_LIBS += [
             'rt',
             'X11',
             'Xcomposite',
             'Xdamage',
             'Xext',
             'Xfixes',
--- a/media/webrtc/trunk/webrtc/base/base.gyp
+++ b/media/webrtc/trunk/webrtc/base/base.gyp
@@ -206,16 +206,17 @@
           'conditions': [
             #TODO: no libevent.gyp
             ['build_libevent==1', {
               'dependencies': [
                 '<(DEPTH)/base/third_party/libevent/libevent.gyp:libevent',
               ],
             } , {
               'include_dirs': [
+                '$(MOZ_LIBEVENT_CFLAGS)',
                 '<(libevent_dir)/',
                 '<(libevent_dir)/../',
                 '<(libevent_dir)/include/',
               ],
               'conditions': [
                 ['OS=="mac" or OS=="ios"', {
                   'include_dirs': [
                     '<(libevent_dir)/mac/',