Files
platform-external-webrtc/webrtc/system_wrappers/BUILD.gn
mbonadei 148d5a2dca Reland of Enable GN check for webrtc/base (patchset #3 id:230001 of https://codereview.webrtc.org/2838683002/ )
Reason for revert:
Fourth attempt to land.

Waiting for https://codereview.webrtc.org/2845013003 to
avoid conflicts on webrtc/modules/audio_coding:neteq_unittest_tools.

Original issue's description:
> Revert of Enable GN check for webrtc/base (patchset #13 id:240001 of https://codereview.webrtc.org/2717083002/ )
>
> Reason for revert:
> Breaks Chromium because in Chromium we import WebRTC with rtc_include_tests=false (https://bugs.chromium.org/p/chromium/issues/detail?id=713179#c6).
>
> Chromium uses webrtc/test/fuzzers and this CL adds test dependencies to neteq_rtc_fuzzer.
>
> Original issue's description:
> > Enable GN check for webrtc/base
> >
> > It's not possible to enable it for the rtc_base_approved
> > target but since a larger refactoring is ongoing for webrtc/base
> > this CL doesn't attempt to fix that.
> >
> > Changes made:
> > * Move webrtc/system_wrappers/include/stringize_macros.h into
> >   webrtc/base:rtc_base_approved_unittests (and corresponding
> >   unit test to rtc_base_approved_unittests).
> > * Move md5digest.* from rtc_base_approved to rtc_base_test_utils target.
> > * Move webrtc/system_wrappers/include/stringize_macros.h (+test) into
> >   webrtc/base.
> > * Remove unused use include of webrtc/base/fileutils.h in
> >   webrtc/base/pathutils.cc
> >
> > BUG=webrtc:6828, webrtc:3806, webrtc:7480
> > NOTRY=True
> >
> > Review-Url: https://codereview.webrtc.org/2717083002
> > Cr-Commit-Position: refs/heads/master@{#17766}
> > Committed: ed754e71ae
>
> TBR=perkj@webrtc.org,tommi@webrtc.org,nisse@webrtc.org,kjellander@webrtc.org
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=webrtc:6828, webrtc:3806, webrtc:7480
> NOTRY=True
>
> Review-Url: https://codereview.webrtc.org/2838683002
> Cr-Commit-Position: refs/heads/master@{#17849}
> Committed: 11ed366c48

TBR=perkj@webrtc.org,tommi@webrtc.org,nisse@webrtc.org,kjellander@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:6828, webrtc:3806, webrtc:7480

Review-Url: https://codereview.webrtc.org/2852663002
Cr-Commit-Position: refs/heads/master@{#17927}
2017-04-28 12:24:50 +00:00

237 lines
5.4 KiB
Plaintext

# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
if (is_android) {
import("//build/config/android/config.gni")
import("//build/config/android/rules.gni")
}
import("../webrtc.gni")
rtc_static_library("system_wrappers") {
sources = [
"include/aligned_array.h",
"include/aligned_malloc.h",
"include/atomic32.h",
"include/clock.h",
"include/cpu_info.h",
"include/event_wrapper.h",
"include/file_wrapper.h",
"include/fix_interlocked_exchange_pointer_win.h",
"include/ntp_time.h",
"include/rtp_to_ntp_estimator.h",
"include/rw_lock_wrapper.h",
"include/sleep.h",
"include/static_instance.h",
"include/timestamp_extrapolator.h",
"include/trace.h",
"source/aligned_malloc.cc",
"source/atomic32_win.cc",
"source/clock.cc",
"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/file_impl.cc",
"source/rtp_to_ntp_estimator.cc",
"source/rw_lock.cc",
"source/rw_lock_posix.cc",
"source/rw_lock_posix.h",
"source/rw_lock_win.cc",
"source/rw_lock_win.h",
"source/sleep.cc",
"source/timestamp_extrapolator.cc",
"source/trace_impl.cc",
"source/trace_impl.h",
"source/trace_posix.cc",
"source/trace_posix.h",
"source/trace_win.cc",
"source/trace_win.h",
]
defines = []
libs = []
deps = [
"..:webrtc_common",
]
public_deps = [
":cpu_features_api",
":field_trial_api",
":metrics_api",
]
if (is_android) {
sources += [
"include/logcat_trace_context.h",
"source/logcat_trace_context.cc",
]
defines += [ "WEBRTC_THREAD_RR" ]
deps += [ ":cpu_features_android" ]
libs += [ "log" ]
}
if (is_linux) {
defines += [ "WEBRTC_THREAD_RR" ]
if (!build_with_chromium) {
deps += [ ":cpu_features_linux" ]
}
libs += [ "rt" ]
}
if (is_linux || is_android) {
sources += [ "source/atomic32_non_darwin_unix.cc" ]
}
if (is_ios || is_mac) {
defines += [ "WEBRTC_THREAD_RR" ]
sources += [ "source/atomic32_darwin.cc" ]
}
# TODO(jschuh): Bug 1348: fix this warning.
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
if (is_win) {
libs += [ "winmm.lib" ]
cflags = [ "/wd4334" ] # Ignore warning on shift operator promotion.
# Windows needs //webrtc/base:rtc_base due to include of webrtc/base/win32.h
# in source/clock.cc.
# TODO(kjellander): Remove (bugs.webrtc.org/6828)
deps += [ "../base:rtc_base" ]
}
if (is_win && is_clang) {
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
}
deps += [ "../base:rtc_base_approved" ]
}
rtc_source_set("cpu_features_api") {
sources = [
"include/cpu_features_wrapper.h",
]
deps = [
"..:webrtc_common",
]
}
rtc_source_set("field_trial_api") {
sources = [
"include/field_trial.h",
]
}
rtc_source_set("metrics_api") {
sources = [
"include/metrics.h",
]
deps = [
"..:webrtc_common",
"../base:rtc_base_approved",
]
}
rtc_static_library("field_trial_default") {
sources = [
"include/field_trial_default.h",
"source/field_trial_default.cc",
]
deps = [
":field_trial_api",
]
}
rtc_static_library("metrics_default") {
sources = [
"include/metrics_default.h",
"source/metrics_default.cc",
]
deps = [
":metrics_api",
"../base:rtc_base_approved",
]
}
group("system_wrappers_default") {
deps = [
":field_trial_default",
":metrics_default",
":system_wrappers",
]
}
if (is_android) {
rtc_static_library("cpu_features_android") {
sources = [
"source/cpu_features_android.c",
]
deps = [
"//third_party/android_tools:cpu_features",
]
}
}
if (is_linux) {
rtc_static_library("cpu_features_linux") {
sources = [
"source/cpu_features_linux.c",
]
deps = [
":cpu_features_api",
]
}
}
if (rtc_include_tests) {
rtc_test("system_wrappers_unittests") {
testonly = true
sources = [
"source/aligned_array_unittest.cc",
"source/aligned_malloc_unittest.cc",
"source/clock_unittest.cc",
"source/event_timer_posix_unittest.cc",
"source/metrics_default_unittest.cc",
"source/metrics_unittest.cc",
"source/ntp_time_unittest.cc",
"source/rtp_to_ntp_estimator_unittest.cc",
]
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
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" ]
}
deps = [
":metrics_default",
":system_wrappers",
"..:webrtc_common",
"../base:rtc_base_approved",
"../test:test_main",
"//testing/gtest",
]
if (is_android) {
deps += [ "//testing/android/native_test:native_test_support" ]
shard_timeout = 900
}
}
}