Bug 1386164 - Part 2. Use MOZ_SYSTEM_LIBEVENT for webrtc. r=jesup, a=lizzard
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Thu, 03 Aug 2017 13:28:25 +0900
changeset 423519 a3904db13d09c4904f0d3ca8c9cba5bd10c0903e
parent 423518 7b672c34268cb2e8d813288235bdf6f34c4d9d29
child 423520 e7efe3c1a1c4e3a192cd8682ffeac2173dcb232a
push id1517
push userjlorenzo@mozilla.com
push dateThu, 14 Sep 2017 16:50:54 +0000
treeherdermozilla-release@3b41fd564418 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup, lizzard
bugs1386164
milestone56.0
Bug 1386164 - Part 2. Use MOZ_SYSTEM_LIBEVENT for webrtc. r=jesup, a=lizzard 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/',