mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-24 06:16:30 +03:00
build: Trim libevent usage
Use system libevent on Linux. Remove extra libs on other platforms.
This commit is contained in:
parent
a0f9440a63
commit
32712cf172
@ -1818,7 +1818,11 @@ jumbo_component("base") {
|
||||
}
|
||||
|
||||
if (dep_libevent) {
|
||||
deps += [ "//base/third_party/libevent" ]
|
||||
if (is_linux) {
|
||||
libs += [ "event_core" ]
|
||||
} else {
|
||||
deps += [ "//base/third_party/libevent" ]
|
||||
}
|
||||
}
|
||||
|
||||
if (use_libevent) {
|
||||
@ -2566,6 +2570,7 @@ test("base_unittests") {
|
||||
]
|
||||
|
||||
defines = []
|
||||
libs = []
|
||||
|
||||
deps = [
|
||||
":base",
|
||||
@ -2711,7 +2716,11 @@ test("base_unittests") {
|
||||
|
||||
if (use_libevent) {
|
||||
sources += [ "message_loop/message_pump_libevent_unittest.cc" ]
|
||||
deps += [ "//base/third_party/libevent" ]
|
||||
if (is_linux) {
|
||||
libs += [ "event_core" ]
|
||||
} else {
|
||||
deps += [ "//base/third_party/libevent" ]
|
||||
}
|
||||
}
|
||||
|
||||
if (is_fuchsia) {
|
||||
|
@ -14,7 +14,6 @@
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/posix/eintr_wrapper.h"
|
||||
#include "base/third_party/libevent/event.h"
|
||||
#include "base/time/time.h"
|
||||
#include "base/trace_event/trace_event.h"
|
||||
#include "build/build_config.h"
|
||||
@ -23,6 +22,12 @@
|
||||
#include "base/mac/scoped_nsautorelease_pool.h"
|
||||
#endif
|
||||
|
||||
#if defined(OS_LINUX)
|
||||
#include <event.h>
|
||||
#else
|
||||
#include "base/third_party/libevent/event.h"
|
||||
#endif
|
||||
|
||||
// Lifecycle of struct event
|
||||
// Libevent uses two main data structures:
|
||||
// struct event_base (of which there is one per message pump), and
|
||||
|
Loading…
Reference in New Issue
Block a user