Index: webrtc/base/BUILD.gn |
diff --git a/webrtc/base/BUILD.gn b/webrtc/base/BUILD.gn |
index aefcfc5a4990ee3e4a7eb7b7d5a6b4862390b34b..1e868b504e528e911118efd52f261bf14129fff9 100644 |
--- a/webrtc/base/BUILD.gn |
+++ b/webrtc/base/BUILD.gn |
@@ -148,11 +148,7 @@ static_library("rtc_base_approved") { |
"systeminfo.cc", |
"systeminfo.h", |
"task_queue.h", |
- "task_queue_gcd.cc", |
- "task_queue_libevent.cc", |
- "task_queue_posix.cc", |
"task_queue_posix.h", |
- "task_queue_win.cc", |
"template_util.h", |
"thread_annotations.h", |
"thread_checker.h", |
@@ -179,21 +175,25 @@ static_library("rtc_base_approved") { |
] |
} |
- if (!is_win && !is_mac && !is_ios && !is_nacl) { |
+ if (rtc_build_libevent) { |
deps += [ "//base/third_party/libevent" ] |
- defines += [ "WEBRTC_BUILD_LIBEVENT" ] |
} |
- |
- if (is_mac || is_ios || is_win || is_nacl) { |
- sources -= [ "task_queue_libevent.cc" ] |
- } |
- |
- if (is_linux || is_android || is_win || is_nacl) { |
- sources -= [ "task_queue_gcd.cc" ] |
- } |
- |
- if (is_nacl) { |
- sources -= [ "task_queue_posix.cc" ] |
+ if (rtc_enable_libevent) { |
+ sources += [ |
+ "task_queue_libevent.cc", |
+ "task_queue_posix.cc", |
+ ] |
+ } else { |
+ # If not libevent, fall back to the other task queues. |
+ if (is_mac || is_ios) { |
+ sources += [ |
+ "task_queue_gcd.cc", |
+ "task_queue_posix.cc", |
+ ] |
+ } |
+ if (is_win) { |
+ sources += [ "task_queue_win.cc" ] |
+ } |
} |
} |