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

Side by Side Diff: webrtc/system_wrappers/BUILD.gn

Issue 2739863002: Enable GN check for webrtc/{p2p,system_wrappers} (Closed)
Patch Set: Rebased Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « webrtc/p2p/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
2 # 2 #
3 # Use of this source code is governed by a BSD-style license 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 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 5 # tree. An additional intellectual property rights grant can be found
6 # in the file PATENTS. All contributing project authors may 6 # in the file PATENTS. All contributing project authors may
7 # be found in the AUTHORS file in the root of the source tree. 7 # be found in the AUTHORS file in the root of the source tree.
8 8
9 if (is_android) { 9 if (is_android) {
10 import("//build/config/android/config.gni") 10 import("//build/config/android/config.gni")
11 import("//build/config/android/rules.gni") 11 import("//build/config/android/rules.gni")
12 } 12 }
13 import("../webrtc.gni") 13 import("../webrtc.gni")
14 14
15 rtc_static_library("system_wrappers") { 15 rtc_static_library("system_wrappers") {
16 sources = [ 16 sources = [
17 "include/aligned_array.h", 17 "include/aligned_array.h",
18 "include/aligned_malloc.h", 18 "include/aligned_malloc.h",
19 "include/atomic32.h", 19 "include/atomic32.h",
20 "include/clock.h", 20 "include/clock.h",
21 "include/cpu_features_wrapper.h",
22 "include/cpu_info.h", 21 "include/cpu_info.h",
23 "include/event_wrapper.h", 22 "include/event_wrapper.h",
24 "include/field_trial.h",
25 "include/file_wrapper.h", 23 "include/file_wrapper.h",
26 "include/fix_interlocked_exchange_pointer_win.h", 24 "include/fix_interlocked_exchange_pointer_win.h",
27 "include/metrics.h",
28 "include/ntp_time.h", 25 "include/ntp_time.h",
29 "include/rtp_to_ntp_estimator.h", 26 "include/rtp_to_ntp_estimator.h",
30 "include/rw_lock_wrapper.h", 27 "include/rw_lock_wrapper.h",
31 "include/sleep.h", 28 "include/sleep.h",
32 "include/static_instance.h", 29 "include/static_instance.h",
33 "include/timestamp_extrapolator.h", 30 "include/timestamp_extrapolator.h",
34 "include/trace.h", 31 "include/trace.h",
35 "source/aligned_malloc.cc", 32 "source/aligned_malloc.cc",
36 "source/atomic32_win.cc", 33 "source/atomic32_win.cc",
37 "source/clock.cc", 34 "source/clock.cc",
(...skipping 19 matching lines...) Expand all
57 "source/trace_posix.h", 54 "source/trace_posix.h",
58 "source/trace_win.cc", 55 "source/trace_win.cc",
59 "source/trace_win.h", 56 "source/trace_win.h",
60 ] 57 ]
61 58
62 defines = [] 59 defines = []
63 libs = [] 60 libs = []
64 deps = [ 61 deps = [
65 "..:webrtc_common", 62 "..:webrtc_common",
66 ] 63 ]
64 public_deps = [
65 ":cpu_features_api",
66 ":field_trial_api",
67 ":metrics_api",
68 ]
67 69
68 if (is_android) { 70 if (is_android) {
69 sources += [ 71 sources += [
70 "include/logcat_trace_context.h", 72 "include/logcat_trace_context.h",
71 "source/logcat_trace_context.cc", 73 "source/logcat_trace_context.cc",
72 ] 74 ]
73 75
74 defines += [ "WEBRTC_THREAD_RR" ] 76 defines += [ "WEBRTC_THREAD_RR" ]
75 77
76 deps += [ ":cpu_features_android" ] 78 deps += [ ":cpu_features_android" ]
(...skipping 20 matching lines...) Expand all
97 sources += [ "source/atomic32_darwin.cc" ] 99 sources += [ "source/atomic32_darwin.cc" ]
98 } 100 }
99 101
100 # TODO(jschuh): Bug 1348: fix this warning. 102 # TODO(jschuh): Bug 1348: fix this warning.
101 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] 103 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
102 104
103 if (is_win) { 105 if (is_win) {
104 libs += [ "winmm.lib" ] 106 libs += [ "winmm.lib" ]
105 107
106 cflags = [ "/wd4334" ] # Ignore warning on shift operator promotion. 108 cflags = [ "/wd4334" ] # Ignore warning on shift operator promotion.
109
110 # Windows needs //webrtc/base:rtc_base due to include of webrtc/base/win32.h
111 # in source/clock.cc.
112 # TODO(kjellander): Remove (bugs.webrtc.org/6828)
113 deps += [ "../base:rtc_base" ]
107 } 114 }
108 115
109 if (is_win && is_clang) { 116 if (is_win && is_clang) {
110 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). 117 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
111 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] 118 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
112 } 119 }
113 120
114 deps += [ "../base:rtc_base_approved" ] 121 deps += [ "../base:rtc_base_approved" ]
115 } 122 }
116 123
124 rtc_source_set("cpu_features_api") {
125 sources = [
126 "include/cpu_features_wrapper.h",
127 ]
128 deps = [
129 "..:webrtc_common",
130 ]
131 }
132
133 rtc_source_set("field_trial_api") {
134 sources = [
135 "include/field_trial.h",
136 ]
137 }
138
139 rtc_source_set("metrics_api") {
140 sources = [
141 "include/metrics.h",
142 ]
143 deps = [
144 "..:webrtc_common",
145 "../base:rtc_base_approved",
146 ]
147 }
148
117 rtc_static_library("field_trial_default") { 149 rtc_static_library("field_trial_default") {
118 sources = [ 150 sources = [
119 "include/field_trial_default.h", 151 "include/field_trial_default.h",
120 "source/field_trial_default.cc", 152 "source/field_trial_default.cc",
121 ] 153 ]
154 deps = [
155 ":field_trial_api",
156 ]
122 } 157 }
123 158
124 rtc_static_library("metrics_default") { 159 rtc_static_library("metrics_default") {
125 sources = [ 160 sources = [
126 "include/metrics_default.h", 161 "include/metrics_default.h",
127 "source/metrics_default.cc", 162 "source/metrics_default.cc",
128 ] 163 ]
164 deps = [
165 ":metrics_api",
166 "../base:rtc_base_approved",
167 ]
129 } 168 }
130 169
131 group("system_wrappers_default") { 170 group("system_wrappers_default") {
132 deps = [ 171 deps = [
133 ":field_trial_default", 172 ":field_trial_default",
134 ":metrics_default", 173 ":metrics_default",
135 ":system_wrappers", 174 ":system_wrappers",
136 ] 175 ]
137 } 176 }
138 177
139 if (is_android) { 178 if (is_android) {
140 rtc_static_library("cpu_features_android") { 179 rtc_static_library("cpu_features_android") {
141 sources = [ 180 sources = [
142 "source/cpu_features_android.c", 181 "source/cpu_features_android.c",
143 ] 182 ]
144 183
145 deps = [ 184 deps = [
146 "//third_party/android_tools:cpu_features", 185 "//third_party/android_tools:cpu_features",
147 ] 186 ]
148 } 187 }
149 } 188 }
150 189
151 if (is_linux) { 190 if (is_linux) {
152 rtc_static_library("cpu_features_linux") { 191 rtc_static_library("cpu_features_linux") {
153 sources = [ 192 sources = [
154 "source/cpu_features_linux.c", 193 "source/cpu_features_linux.c",
155 ] 194 ]
195 deps = [
196 ":cpu_features_api",
197 ]
156 } 198 }
157 } 199 }
158 200
159 if (rtc_include_tests) { 201 if (rtc_include_tests) {
160 rtc_test("system_wrappers_unittests") { 202 rtc_test("system_wrappers_unittests") {
161 testonly = true 203 testonly = true
162 sources = [ 204 sources = [
163 "source/aligned_array_unittest.cc", 205 "source/aligned_array_unittest.cc",
164 "source/aligned_malloc_unittest.cc", 206 "source/aligned_malloc_unittest.cc",
165 "source/clock_unittest.cc", 207 "source/clock_unittest.cc",
166 "source/event_timer_posix_unittest.cc", 208 "source/event_timer_posix_unittest.cc",
167 "source/metrics_default_unittest.cc", 209 "source/metrics_default_unittest.cc",
168 "source/metrics_unittest.cc", 210 "source/metrics_unittest.cc",
169 "source/ntp_time_unittest.cc", 211 "source/ntp_time_unittest.cc",
170 "source/rtp_to_ntp_estimator_unittest.cc", 212 "source/rtp_to_ntp_estimator_unittest.cc",
171 ] 213 ]
172 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] 214 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
173 215
174 if (!build_with_chromium && is_clang) { 216 if (!build_with_chromium && is_clang) {
175 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). 217 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
176 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] 218 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
177 } 219 }
178 220
179 deps = [ 221 deps = [
180 ":metrics_default", 222 ":metrics_default",
181 ":system_wrappers", 223 ":system_wrappers",
224 "..:webrtc_common",
225 "../base:rtc_base_approved",
182 "../test:test_main", 226 "../test:test_main",
183 "//testing/gtest", 227 "//testing/gtest",
184 ] 228 ]
185 229
186 if (is_android) { 230 if (is_android) {
187 deps += [ "//testing/android/native_test:native_test_support" ] 231 deps += [ "//testing/android/native_test:native_test_support" ]
188 232
189 shard_timeout = 900 233 shard_timeout = 900
190 } 234 }
191 } 235 }
192 } 236 }
OLDNEW
« no previous file with comments | « webrtc/p2p/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698