From d69a726989cdeb5abdb1f9b742a54a31d661a892 Mon Sep 17 00:00:00 2001 From: Byoungchan Lee Date: Thu, 23 Jun 2022 22:06:00 +0900 Subject: [PATCH] Make WebRTC use third_party/libevent rather than base/third_party/libevent Bug: chromium:1335194 Change-Id: I084b391b42e2496163ea625c0bdc9255177e5603 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266680 Auto-Submit: Daniel.L (Byoungchan) Lee Commit-Queue: Harald Alvestrand Reviewed-by: Harald Alvestrand Reviewed-by: Mirko Bonadei Cr-Commit-Position: refs/heads/main@{#37375} --- DEPS | 3 +-- rtc_base/BUILD.gn | 2 +- rtc_base/DEPS | 2 +- rtc_base/task_queue_libevent.cc | 2 +- tools_webrtc/libs/generate_licenses.py | 6 +----- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/DEPS b/DEPS index 8a0208e5e1..6927d80103 100644 --- a/DEPS +++ b/DEPS @@ -24,8 +24,7 @@ vars = { } deps = { - # TODO(kjellander): Move this to be Android-only once the libevent dependency - # in base/third_party/libevent is solved. + # TODO(kjellander): Move this to be Android-only. 'src/base': 'https://chromium.googlesource.com/chromium/src/base@2f3d3763f35854e8436ad0f4acced5a6762b772a', 'src/build': diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn index c8e23a8e7f..c997073898 100644 --- a/rtc_base/BUILD.gn +++ b/rtc_base/BUILD.gn @@ -649,7 +649,7 @@ if (rtc_enable_libevent) { "//third_party/abseil-cpp/absl/strings", ] if (rtc_build_libevent) { - deps += [ "//base/third_party/libevent" ] + deps += [ "//third_party/libevent" ] } } } diff --git a/rtc_base/DEPS b/rtc_base/DEPS index c9f7dc5898..3a77b5502a 100644 --- a/rtc_base/DEPS +++ b/rtc_base/DEPS @@ -1,8 +1,8 @@ include_rules = [ - "+base/third_party/libevent", "+json", "+system_wrappers", "+third_party/jsoncpp", + "+third_party/libevent", ] specific_include_rules = { diff --git a/rtc_base/task_queue_libevent.cc b/rtc_base/task_queue_libevent.cc index 4f56400741..ba80a64f9b 100644 --- a/rtc_base/task_queue_libevent.cc +++ b/rtc_base/task_queue_libevent.cc @@ -27,7 +27,6 @@ #include "absl/strings/string_view.h" #include "api/task_queue/queued_task.h" #include "api/task_queue/task_queue_base.h" -#include "base/third_party/libevent/event.h" #include "rtc_base/checks.h" #include "rtc_base/logging.h" #include "rtc_base/numerics/safe_conversions.h" @@ -36,6 +35,7 @@ #include "rtc_base/synchronization/mutex.h" #include "rtc_base/thread_annotations.h" #include "rtc_base/time_utils.h" +#include "third_party/libevent/event.h" namespace webrtc { namespace { diff --git a/tools_webrtc/libs/generate_licenses.py b/tools_webrtc/libs/generate_licenses.py index bcc6890465..f888a538c0 100755 --- a/tools_webrtc/libs/generate_licenses.py +++ b/tools_webrtc/libs/generate_licenses.py @@ -53,8 +53,7 @@ LIB_TO_LICENSES_DICT = { 'libaom': ['third_party/libaom/source/libaom/LICENSE'], 'libc++': ['buildtools/third_party/libc++/trunk/LICENSE.TXT'], 'libc++abi': ['buildtools/third_party/libc++abi/trunk/LICENSE.TXT'], - 'libevent': - ['base/third_party/libevent/LICENSE', 'third_party/libevent/LICENSE'], + 'libevent': ['third_party/libevent/LICENSE'], 'libjpeg_turbo': ['third_party/libjpeg_turbo/LICENSE.md'], 'libsrtp': ['third_party/libsrtp/LICENSE'], 'libunwind': ['buildtools/third_party/libunwind/trunk/LICENSE.TXT'], @@ -221,9 +220,6 @@ class LicenseBuilder: output_license_file.write('```\n') for path in self.common_licenses_dict[license_lib]: license_path = os.path.join(WEBRTC_ROOT, path) - # TODO(crbug.com/1335194) Workaround for unblocking autoroller. - if license_lib == "libevent" and not os.path.exists(license_path): - continue with open(license_path, 'r') as license_file: license_text = escape(license_file.read(), quote=True) output_license_file.write(license_text)