From d2130a38108ba4f527ec733d7a66dcde28e37cd6 Mon Sep 17 00:00:00 2001 From: Makoto Kato Date: Thu, 3 Aug 2017 13:28:25 +0900 Subject: [PATCH] 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 --HG-- extra : rebase_source : 9e619c2f49e7c2b3f680814b95b823996773fa6c --- build/gyp.mozbuild | 4 +++- media/webrtc/trunk/gtest/moz.build | 9 ++++++--- media/webrtc/trunk/webrtc/base/base.gyp | 1 + 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/build/gyp.mozbuild b/build/gyp.mozbuild index d45d46946d97..67d591e5cc1f 100644 --- a/build/gyp.mozbuild +++ b/build/gyp.mozbuild @@ -43,7 +43,6 @@ gyp_vars.update({ '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, @@ -124,3 +123,6 @@ if 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' diff --git a/media/webrtc/trunk/gtest/moz.build b/media/webrtc/trunk/gtest/moz.build index 661b4968b1c4..87eb97e388c4 100644 --- a/media/webrtc/trunk/gtest/moz.build +++ b/media/webrtc/trunk/gtest/moz.build @@ -64,9 +64,12 @@ if CONFIG['OS_TARGET'] in ['Darwin', 'Linux', 'WINNT']: '../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', diff --git a/media/webrtc/trunk/webrtc/base/base.gyp b/media/webrtc/trunk/webrtc/base/base.gyp index 085d8dfb4a37..4dd48f7d5f81 100644 --- a/media/webrtc/trunk/webrtc/base/base.gyp +++ b/media/webrtc/trunk/webrtc/base/base.gyp @@ -211,6 +211,7 @@ ], } , { 'include_dirs': [ + '$(MOZ_LIBEVENT_CFLAGS)', '<(libevent_dir)/', '<(libevent_dir)/../', '<(libevent_dir)/include/',