From 450cdf3fc886457b830127d0f469167d81785f2e Mon Sep 17 00:00:00 2001 From: Fabrice de Gans-Riberi Date: Tue, 17 Apr 2018 12:56:01 -0700 Subject: [PATCH] Clean up posix-only files. This removes posix-only files from the default source set, forcing them to be explictly included for the desired configurations. Bug: chromium:812974 Change-Id: Ic4a1561f87395801ca4d3936a95a66fd4270c5ef Reviewed-on: https://webrtc-review.googlesource.com/70564 Reviewed-by: Benjamin Wright Commit-Queue: Fabrice de Gans-Riberi Cr-Commit-Position: refs/heads/master@{#22913} --- modules/desktop_capture/BUILD.gn | 9 +++++++-- system_wrappers/BUILD.gn | 16 +++++++++++++--- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/modules/desktop_capture/BUILD.gn b/modules/desktop_capture/BUILD.gn index 7c07c9e3b2..54b11032fa 100644 --- a/modules/desktop_capture/BUILD.gn +++ b/modules/desktop_capture/BUILD.gn @@ -126,8 +126,6 @@ if (rtc_include_tests) { "screen_drawer.cc", "screen_drawer.h", "screen_drawer_linux.cc", - "screen_drawer_lock_posix.cc", - "screen_drawer_lock_posix.h", "screen_drawer_mac.cc", "screen_drawer_win.cc", ] @@ -138,6 +136,13 @@ if (rtc_include_tests) { "../../rtc_base:rtc_base_approved", "../../system_wrappers", ] + + if (is_posix || is_fuchsia) { + sources += [ + "screen_drawer_lock_posix.cc", + "screen_drawer_lock_posix.h", + ] + } } source_set("desktop_capture_mock") { diff --git a/system_wrappers/BUILD.gn b/system_wrappers/BUILD.gn index d24b16ba6d..af778fd90c 100644 --- a/system_wrappers/BUILD.gn +++ b/system_wrappers/BUILD.gn @@ -25,8 +25,6 @@ rtc_static_library("system_wrappers") { "source/cpu_features.cc", "source/cpu_info.cc", "source/event.cc", - "source/event_timer_posix.cc", - "source/event_timer_posix.h", "source/event_timer_win.cc", "source/event_timer_win.h", "source/rtp_to_ntp_estimator.cc", @@ -48,6 +46,13 @@ rtc_static_library("system_wrappers") { "../rtc_base/synchronization:rw_lock_wrapper", ] + if (is_posix || is_fuchsia) { + sources += [ + "source/event_timer_posix.cc", + "source/event_timer_posix.h", + ] + } + if (is_android) { defines += [ "WEBRTC_THREAD_RR" ] @@ -208,7 +213,6 @@ if (rtc_include_tests) { testonly = true sources = [ "source/clock_unittest.cc", - "source/event_timer_posix_unittest.cc", "source/metrics_default_unittest.cc", "source/metrics_unittest.cc", "source/ntp_time_unittest.cc", @@ -216,6 +220,12 @@ if (rtc_include_tests) { ] configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] + if (is_posix || is_fuchsia) { + sources += [ + "source/event_timer_posix_unittest.cc", + ] + } + if (!build_with_chromium && is_clang) { # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]