1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
3 # Use of this source code is governed by a BSD-style license
4 # that can be found in the LICENSE file in the root of the source
5 # tree. An additional intellectual property rights grant can be found
6 # in the file PATENTS. All contributing project authors may
7 # be found in the AUTHORS file in the root of the source tree.
9 import("//build/config/android/config.gni")
10 import("../build/webrtc.gni")
12 config("system_wrappers_inherited_config") {
18 static_library("system_wrappers") {
20 "interface/aligned_malloc.h",
21 "interface/atomic32.h",
23 "interface/compile_assert.h",
24 "interface/condition_variable_wrapper.h",
25 "interface/cpu_info.h",
26 "interface/cpu_features_wrapper.h",
27 "interface/critical_section_wrapper.h",
28 "interface/data_log.h",
29 "interface/data_log_c.h",
30 "interface/data_log_impl.h",
31 "interface/event_tracer.h",
32 "interface/event_wrapper.h",
33 "interface/field_trial.h",
34 "interface/file_wrapper.h",
35 "interface/fix_interlocked_exchange_pointer_win.h",
36 "interface/logging.h",
37 "interface/ref_count.h",
38 "interface/rtp_to_ntp.h",
39 "interface/rw_lock_wrapper.h",
40 "interface/scoped_ptr.h",
41 "interface/scoped_refptr.h",
42 "interface/scoped_vector.h",
45 "interface/static_instance.h",
46 "interface/stl_util.h",
47 "interface/stringize_macros.h",
48 "interface/thread_wrapper.h",
49 "interface/tick_util.h",
50 "interface/timestamp_extrapolator.h",
52 "interface/trace_event.h",
53 "interface/utf_util_win.h",
54 "source/aligned_malloc.cc",
55 "source/atomic32_mac.cc",
56 "source/atomic32_win.cc",
58 "source/condition_variable.cc",
59 "source/condition_variable_posix.cc",
60 "source/condition_variable_posix.h",
61 "source/condition_variable_event_win.cc",
62 "source/condition_variable_event_win.h",
63 "source/condition_variable_native_win.cc",
64 "source/condition_variable_native_win.h",
66 "source/cpu_features.cc",
67 "source/critical_section.cc",
68 "source/critical_section_posix.cc",
69 "source/critical_section_posix.h",
70 "source/critical_section_win.cc",
71 "source/critical_section_win.h",
72 "source/data_log_c.cc",
74 "source/event_posix.cc",
75 "source/event_posix.h",
76 "source/event_tracer.cc",
77 "source/event_win.cc",
79 "source/file_impl.cc",
82 "source/rtp_to_ntp.cc",
84 "source/rw_lock_generic.cc",
85 "source/rw_lock_generic.h",
86 "source/rw_lock_posix.cc",
87 "source/rw_lock_posix.h",
88 "source/rw_lock_win.cc",
89 "source/rw_lock_win.h",
90 "source/set_thread_name_win.h",
93 "source/tick_util.cc",
95 "source/thread_posix.cc",
96 "source/thread_posix.h",
97 "source/thread_win.cc",
98 "source/thread_win.h",
99 "source/timestamp_extrapolator.cc",
100 "source/trace_impl.cc",
101 "source/trace_impl.h",
102 "source/trace_posix.cc",
103 "source/trace_posix.h",
104 "source/trace_win.cc",
105 "source/trace_win.h",
108 configs += [ "..:common_config" ]
111 # Suppress warnings from Chrome's Clang plugins.
112 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
113 configs -= [ "//build/config/clang:find_bad_constructs" ]
116 direct_dependent_configs = [
117 "..:common_inherited_config",
118 ":system_wrappers_inherited_config",
121 if (rtc_enable_data_logging) {
122 sources += [ "source/data_log.cc" ]
124 sources += [ "source/data_log_no_op.cc" ]
133 "interface/logcat_trace_context.h",
134 "source/logcat_trace_context.cc",
139 # TODO(leozwang): Investigate CLOCK_REALTIME and CLOCK_MONOTONIC
140 # support on Android. Keep WEBRTC_CLOCK_TYPE_REALTIME for now,
141 # remove it after I verify that CLOCK_MONOTONIC is fully functional
142 # with condition and event functions in system_wrappers.
143 "WEBRTC_CLOCK_TYPE_REALTIME",
146 deps += [ ":cpu_features_android" ]
154 # TODO(andrew): can we select this automatically?
155 # Define this if the Linux system does not support CLOCK_MONOTONIC.
156 #"WEBRTC_CLOCK_TYPE_REALTIME",
162 if (!is_mac && !is_ios) {
164 "source/atomic32_posix.cc",
168 if (is_ios || is_mac) {
171 "WEBRTC_CLOCK_TYPE_REALTIME",
177 "source/atomic32_mac.cc",
182 libs += [ "winmm.lib" ]
185 "/wd4267", # size_t to int truncation.
186 "/wd4334", # Ignore warning on shift operator promotion.
191 "source/spreadsortlib",
195 "../base:rtc_base_approved",
199 source_set("field_trial_default") {
201 "source/field_trial_default.cc",
205 # Suppress warnings from Chrome's Clang plugins.
206 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
207 configs -= [ "//build/config/clang:find_bad_constructs" ]
216 source_set("cpu_features_android") {
218 "source/cpu_features_android.c",
221 if (is_android_webview_build) {
222 libs += [ "cpufeatures.a" ]
224 deps = [ "//third_party/android_tools:cpu_features" ]