2014-06-21 14:25:16 +00:00
|
|
|
# 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.
|
|
|
|
|
|
2016-06-02 02:18:48 -07:00
|
|
|
if (is_android) {
|
|
|
|
|
import("//build/config/android/config.gni")
|
|
|
|
|
import("//build/config/android/rules.gni")
|
|
|
|
|
}
|
2014-06-21 14:25:16 +00:00
|
|
|
import("../build/webrtc.gni")
|
|
|
|
|
|
2016-09-23 00:38:52 -07:00
|
|
|
rtc_static_library("system_wrappers") {
|
2014-06-21 14:25:16 +00:00
|
|
|
sources = [
|
2015-10-28 18:17:40 +01:00
|
|
|
"include/aligned_array.h",
|
|
|
|
|
"include/aligned_malloc.h",
|
|
|
|
|
"include/atomic32.h",
|
|
|
|
|
"include/clock.h",
|
|
|
|
|
"include/cpu_features_wrapper.h",
|
|
|
|
|
"include/cpu_info.h",
|
|
|
|
|
"include/critical_section_wrapper.h",
|
|
|
|
|
"include/event_wrapper.h",
|
|
|
|
|
"include/field_trial.h",
|
|
|
|
|
"include/file_wrapper.h",
|
|
|
|
|
"include/fix_interlocked_exchange_pointer_win.h",
|
|
|
|
|
"include/logging.h",
|
|
|
|
|
"include/metrics.h",
|
2016-05-25 11:37:11 -07:00
|
|
|
"include/ntp_time.h",
|
2015-10-28 18:17:40 +01:00
|
|
|
"include/rtp_to_ntp.h",
|
|
|
|
|
"include/rw_lock_wrapper.h",
|
|
|
|
|
"include/sleep.h",
|
|
|
|
|
"include/sort.h",
|
|
|
|
|
"include/static_instance.h",
|
|
|
|
|
"include/stl_util.h",
|
|
|
|
|
"include/stringize_macros.h",
|
|
|
|
|
"include/timestamp_extrapolator.h",
|
|
|
|
|
"include/trace.h",
|
|
|
|
|
"include/utf_util_win.h",
|
2014-06-21 14:25:16 +00:00
|
|
|
"source/aligned_malloc.cc",
|
|
|
|
|
"source/atomic32_win.cc",
|
|
|
|
|
"source/clock.cc",
|
|
|
|
|
"source/condition_variable_event_win.cc",
|
|
|
|
|
"source/condition_variable_event_win.h",
|
|
|
|
|
"source/cpu_features.cc",
|
2015-05-25 12:55:39 +02:00
|
|
|
"source/cpu_info.cc",
|
2014-06-21 14:25:16 +00:00
|
|
|
"source/event.cc",
|
2015-04-08 11:24:19 +02:00
|
|
|
"source/event_timer_posix.cc",
|
|
|
|
|
"source/event_timer_posix.h",
|
|
|
|
|
"source/event_timer_win.cc",
|
|
|
|
|
"source/event_timer_win.h",
|
2014-06-21 14:25:16 +00:00
|
|
|
"source/file_impl.cc",
|
|
|
|
|
"source/logging.cc",
|
|
|
|
|
"source/rtp_to_ntp.cc",
|
|
|
|
|
"source/rw_lock.cc",
|
2015-02-07 22:35:54 +00:00
|
|
|
"source/rw_lock_posix.cc",
|
|
|
|
|
"source/rw_lock_posix.h",
|
|
|
|
|
"source/rw_lock_win.cc",
|
|
|
|
|
"source/rw_lock_win.h",
|
2016-01-19 02:59:56 -08:00
|
|
|
"source/rw_lock_winxp_win.cc",
|
|
|
|
|
"source/rw_lock_winxp_win.h",
|
2014-06-21 14:25:16 +00:00
|
|
|
"source/sleep.cc",
|
|
|
|
|
"source/sort.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 = []
|
2015-05-25 12:55:39 +02:00
|
|
|
deps = [
|
|
|
|
|
"..:webrtc_common",
|
|
|
|
|
]
|
2014-06-21 14:25:16 +00:00
|
|
|
|
|
|
|
|
if (is_android) {
|
|
|
|
|
sources += [
|
2015-10-28 18:17:40 +01:00
|
|
|
"include/logcat_trace_context.h",
|
2014-06-21 14:25:16 +00:00
|
|
|
"source/logcat_trace_context.cc",
|
|
|
|
|
]
|
|
|
|
|
|
2016-01-26 01:53:20 -08:00
|
|
|
defines += [ "WEBRTC_THREAD_RR" ]
|
2014-06-21 14:25:16 +00:00
|
|
|
|
2014-06-29 13:37:08 +00:00
|
|
|
deps += [ ":cpu_features_android" ]
|
2014-06-21 14:25:16 +00:00
|
|
|
|
|
|
|
|
libs += [ "log" ]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (is_linux) {
|
2016-01-26 01:53:20 -08:00
|
|
|
defines += [ "WEBRTC_THREAD_RR" ]
|
2014-06-21 14:25:16 +00:00
|
|
|
|
2016-04-06 14:02:26 -07:00
|
|
|
if (!build_with_chromium) {
|
|
|
|
|
deps += [ ":cpu_features_linux" ]
|
|
|
|
|
}
|
|
|
|
|
|
2014-06-21 14:25:16 +00:00
|
|
|
libs += [ "rt" ]
|
|
|
|
|
}
|
|
|
|
|
|
2016-05-25 11:37:11 -07:00
|
|
|
if (is_linux || is_android) {
|
|
|
|
|
sources += [ "source/atomic32_non_darwin_unix.cc" ]
|
2014-06-21 14:25:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (is_ios || is_mac) {
|
2016-01-26 01:53:20 -08:00
|
|
|
defines += [ "WEBRTC_THREAD_RR" ]
|
2016-05-25 11:37:11 -07:00
|
|
|
sources += [ "source/atomic32_darwin.cc" ]
|
2014-06-21 14:25:16 +00:00
|
|
|
}
|
|
|
|
|
|
2016-06-02 02:09:52 -07:00
|
|
|
# TODO(jschuh): Bug 1348: fix this warning.
|
|
|
|
|
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
|
|
|
|
|
|
2014-06-21 14:25:16 +00:00
|
|
|
if (is_win) {
|
|
|
|
|
libs += [ "winmm.lib" ]
|
|
|
|
|
|
2016-06-02 02:09:52 -07:00
|
|
|
cflags = [ "/wd4334" ] # Ignore warning on shift operator promotion.
|
2014-06-21 14:25:16 +00:00
|
|
|
}
|
|
|
|
|
|
2016-08-29 02:56:06 -07:00
|
|
|
if (is_win && is_clang) {
|
2016-08-26 13:31:24 -07:00
|
|
|
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
2016-09-02 04:10:34 -07:00
|
|
|
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
|
2016-08-26 13:31:24 -07:00
|
|
|
}
|
|
|
|
|
|
2015-05-25 12:55:39 +02:00
|
|
|
deps += [ "../base:rtc_base_approved" ]
|
2014-06-21 14:25:16 +00:00
|
|
|
}
|
|
|
|
|
|
2016-09-23 00:38:52 -07:00
|
|
|
rtc_static_library("field_trial_default") {
|
2014-06-21 14:25:16 +00:00
|
|
|
sources = [
|
2015-10-28 18:17:40 +01:00
|
|
|
"include/field_trial_default.h",
|
2014-06-21 14:25:16 +00:00
|
|
|
"source/field_trial_default.cc",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2016-09-23 00:38:52 -07:00
|
|
|
rtc_static_library("metrics_default") {
|
2014-10-23 12:57:56 +00:00
|
|
|
sources = [
|
2016-05-20 06:29:46 -07:00
|
|
|
"include/metrics_default.h",
|
2014-10-23 12:57:56 +00:00
|
|
|
"source/metrics_default.cc",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2016-09-23 00:38:52 -07:00
|
|
|
group("system_wrappers_default") {
|
2014-10-23 12:57:56 +00:00
|
|
|
deps = [
|
|
|
|
|
":field_trial_default",
|
|
|
|
|
":metrics_default",
|
2015-11-23 14:47:56 -08:00
|
|
|
":system_wrappers",
|
2014-10-23 12:57:56 +00:00
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2014-06-21 14:25:16 +00:00
|
|
|
if (is_android) {
|
2016-09-23 00:38:52 -07:00
|
|
|
rtc_static_library("cpu_features_android") {
|
2014-06-21 14:25:16 +00:00
|
|
|
sources = [
|
|
|
|
|
"source/cpu_features_android.c",
|
|
|
|
|
]
|
|
|
|
|
|
2015-05-25 12:55:39 +02:00
|
|
|
deps = [
|
|
|
|
|
"//third_party/android_tools:cpu_features",
|
|
|
|
|
]
|
2014-06-21 14:25:16 +00:00
|
|
|
}
|
|
|
|
|
}
|
2016-04-06 14:02:26 -07:00
|
|
|
|
|
|
|
|
if (is_linux) {
|
2016-09-23 00:38:52 -07:00
|
|
|
rtc_static_library("cpu_features_linux") {
|
2016-04-06 14:02:26 -07:00
|
|
|
sources = [
|
|
|
|
|
"source/cpu_features_linux.c",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
2016-06-02 02:18:48 -07:00
|
|
|
|
2016-06-06 23:04:31 +02:00
|
|
|
if (rtc_include_tests) {
|
2016-09-02 04:10:34 -07:00
|
|
|
rtc_test("system_wrappers_unittests") {
|
2016-06-02 13:29:07 +02:00
|
|
|
testonly = true
|
|
|
|
|
sources = [
|
|
|
|
|
"source/aligned_array_unittest.cc",
|
|
|
|
|
"source/aligned_malloc_unittest.cc",
|
|
|
|
|
"source/clock_unittest.cc",
|
|
|
|
|
"source/condition_variable_unittest.cc",
|
|
|
|
|
"source/critical_section_unittest.cc",
|
|
|
|
|
"source/event_timer_posix_unittest.cc",
|
|
|
|
|
"source/logging_unittest.cc",
|
|
|
|
|
"source/metrics_default_unittest.cc",
|
|
|
|
|
"source/metrics_unittest.cc",
|
|
|
|
|
"source/ntp_time_unittest.cc",
|
|
|
|
|
"source/rtp_to_ntp_unittest.cc",
|
|
|
|
|
"source/stl_util_unittest.cc",
|
|
|
|
|
"source/stringize_macros_unittest.cc",
|
2016-06-02 02:18:48 -07:00
|
|
|
]
|
2016-06-02 13:29:07 +02:00
|
|
|
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
|
2016-06-02 02:18:48 -07:00
|
|
|
|
2016-10-16 23:56:12 -07:00
|
|
|
if (!build_with_chromium && is_clang) {
|
|
|
|
|
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
2016-09-02 04:10:34 -07:00
|
|
|
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
|
2016-06-02 13:29:07 +02:00
|
|
|
}
|
2016-06-02 02:18:48 -07:00
|
|
|
|
2016-06-02 13:29:07 +02:00
|
|
|
deps = [
|
|
|
|
|
":metrics_default",
|
|
|
|
|
":system_wrappers",
|
|
|
|
|
"../test:test_support_main",
|
|
|
|
|
"//testing/gtest",
|
|
|
|
|
]
|
2016-06-02 02:18:48 -07:00
|
|
|
|
2016-06-02 13:29:07 +02:00
|
|
|
if (is_android) {
|
|
|
|
|
deps += [ "//testing/android/native_test:native_test_support" ]
|
2016-08-15 02:29:11 -07:00
|
|
|
|
|
|
|
|
shard_timeout = 900
|
2016-06-02 13:29:07 +02:00
|
|
|
}
|
2016-06-02 02:18:48 -07:00
|
|
|
}
|
|
|
|
|
}
|