Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Unified Diff: webrtc/base/BUILD.gn

Issue 1980003002: Separate building and enabling libevent. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Move gyp define Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/base/base.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/BUILD.gn
diff --git a/webrtc/base/BUILD.gn b/webrtc/base/BUILD.gn
index aefcfc5a4990ee3e4a7eb7b7d5a6b4862390b34b..005a0dfab1911336574ff2da3b30d38e61a9d8cb 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,26 @@ static_library("rtc_base_approved") {
]
}
- if (!is_win && !is_mac && !is_ios && !is_nacl) {
- deps += [ "//base/third_party/libevent" ]
+ if (rtc_enable_libevent) {
+ if (rtc_build_libevent) {
kjellander_webrtc 2016/05/17 07:38:26 Move the if (rtc_build_libevent) block out of the
phoglund 2016/05/17 07:59:02 Done.
+ 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" ]
+ 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" ]
+ }
}
}
« no previous file with comments | « no previous file | webrtc/base/base.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698