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

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

Issue 2988433002: Decoupling rtc_base_approved from Obj-C code (Closed)
Patch Set: tightening visibility of rtc_base_approved_objc_all_dependent_config Created 3 years, 3 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 | « no previous file | 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 import("//build/config/crypto.gni") 9 import("//build/config/crypto.gni")
10 import("//build/config/ui.gni") 10 import("//build/config/ui.gni")
(...skipping 13 matching lines...) Expand all
24 ":rtc_base_approved", 24 ":rtc_base_approved",
25 ":rtc_task_queue", 25 ":rtc_task_queue",
26 ":sequenced_task_checker", 26 ":sequenced_task_checker",
27 ":weak_ptr", 27 ":weak_ptr",
28 ] 28 ]
29 if (is_android) { 29 if (is_android) {
30 public_deps += [ ":base_java" ] 30 public_deps += [ ":base_java" ]
31 } 31 }
32 } 32 }
33 33
34 config("rtc_base_approved_all_dependent_config") {
35 if (is_mac && !build_with_chromium) {
36 libs = [ "Foundation.framework" ] # needed for logging_mac.mm
37 }
38 }
39
40 config("rtc_base_chromium_config") { 34 config("rtc_base_chromium_config") {
41 defines = [ "NO_MAIN_THREAD_WRAPPING" ] 35 defines = [ "NO_MAIN_THREAD_WRAPPING" ]
42 } 36 }
43 37
44 config("rtc_base_all_dependent_config") { 38 config("rtc_base_all_dependent_config") {
45 if (is_ios) { 39 if (is_ios) {
46 libs = [ 40 libs = [
47 "CFNetwork.framework", 41 "CFNetwork.framework",
48 "Security.framework", 42 "Security.framework",
49 "SystemConfiguration.framework", 43 "SystemConfiguration.framework",
(...skipping 29 matching lines...) Expand all
79 ] 73 ]
80 } 74 }
81 } 75 }
82 76
83 source_set("compile_assert_c") { 77 source_set("compile_assert_c") {
84 sources = [ 78 sources = [
85 "compile_assert_c.h", 79 "compile_assert_c.h",
86 ] 80 ]
87 } 81 }
88 82
83 rtc_source_set("rtc_base_approved") {
84 public_deps = [
85 ":rtc_base_approved_generic",
86 ]
87 if (is_mac && !build_with_chromium) {
88 public_deps += [ ":rtc_base_approved_objc" ]
89 }
90 }
91
89 # The subset of rtc_base approved for use outside of libjingle. 92 # The subset of rtc_base approved for use outside of libjingle.
90 rtc_static_library("rtc_base_approved") { 93 rtc_source_set("rtc_base_approved_generic") {
91 # TODO(kjellander): Remove (bugs.webrtc.org/7480) 94 # TODO(kjellander): Remove (bugs.webrtc.org/7480)
92 # Enabling GN check triggers a cyclic dependency caused by rate_limiter.cc: 95 # Enabling GN check triggers a cyclic dependency caused by rate_limiter.cc:
93 # :rtc_base_approved -> ../system_wrappers -> :rtc_base_approved 96 # :rtc_base_approved -> ../system_wrappers -> :rtc_base_approved
kwiberg-webrtc 2017/09/01 12:31:05 This comment is supposed to apply to check_include
97 visibility = [
98 ":rtc_base_approved",
99 ":rtc_base_approved_objc",
100 ]
94 check_includes = false 101 check_includes = false
95 defines = [] 102 defines = []
96 libs = [] 103 libs = []
97 deps = [] 104 deps = []
98 all_dependent_configs = [ ":rtc_base_approved_all_dependent_config" ]
99 105
100 sources = [ 106 sources = [
101 "array_view.h", 107 "array_view.h",
102 "arraysize.h", 108 "arraysize.h",
103 "atomicops.h", 109 "atomicops.h",
104 "base64.cc", 110 "base64.cc",
105 "base64.h", 111 "base64.h",
106 "basictypes.h", 112 "basictypes.h",
107 "bind.h", 113 "bind.h",
108 "bitbuffer.cc", 114 "bitbuffer.cc",
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 # Dependency on chromium's logging (in //base). 210 # Dependency on chromium's logging (in //base).
205 deps += [ "//base:base" ] 211 deps += [ "//base:base" ]
206 sources += [ 212 sources += [
207 "../../webrtc_overrides/webrtc/rtc_base/logging.cc", 213 "../../webrtc_overrides/webrtc/rtc_base/logging.cc",
208 "../../webrtc_overrides/webrtc/rtc_base/logging.h", 214 "../../webrtc_overrides/webrtc/rtc_base/logging.h",
209 ] 215 ]
210 } else { 216 } else {
211 sources += [ 217 sources += [
212 "logging.cc", 218 "logging.cc",
213 "logging.h", 219 "logging.h",
214 "logging_mac.mm",
215 ] 220 ]
216 } 221 }
217 if (is_component_build && is_win) { 222 if (is_component_build && is_win) {
218 # Copy the VS runtime DLLs into the isolate so that they don't have to be 223 # Copy the VS runtime DLLs into the isolate so that they don't have to be
219 # preinstalled on the target machine. The debug runtimes have a "d" at 224 # preinstalled on the target machine. The debug runtimes have a "d" at
220 # the end. 225 # the end.
221 # This is a copy of https://codereview.chromium.org/1783973002. 226 # This is a copy of https://codereview.chromium.org/1783973002.
222 # TODO(ehmaldonado): We'd like Chromium to make this changes easier to use, 227 # TODO(ehmaldonado): We'd like Chromium to make this changes easier to use,
223 # so we don't have to copy their changes and risk breakages. 228 # so we don't have to copy their changes and risk breakages.
224 # See http://crbug.com/653569 229 # See http://crbug.com/653569
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 } else { 289 } else {
285 data += [ "$clang_base_path/lib/clang/$clang_version/lib/windows/clang_r t.asan_dynamic-i386.dll" ] 290 data += [ "$clang_base_path/lib/clang/$clang_version/lib/windows/clang_r t.asan_dynamic-i386.dll" ]
286 } 291 }
287 } 292 }
288 } 293 }
289 if (is_nacl) { 294 if (is_nacl) {
290 deps += [ "//native_client_sdk/src/libraries/nacl_io" ] 295 deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
291 } 296 }
292 } 297 }
293 298
299 if (is_mac && !build_with_chromium) {
300 config("rtc_base_approved_objc_all_dependent_config") {
301 visibility = [ ":rtc_base_approved_objc" ]
302 libs = [ "Foundation.framework" ] # needed for logging_mac.mm
303 }
304
305 rtc_source_set("rtc_base_approved_objc") {
306 visibility = [ ":rtc_base_approved" ]
307 all_dependent_configs = [ ":rtc_base_approved_objc_all_dependent_config" ]
308 sources = [
309 "logging_mac.mm",
310 ]
311 deps = [
312 ":rtc_base_approved_generic",
313 ]
314 }
315 }
316
294 config("enable_libevent_config") { 317 config("enable_libevent_config") {
295 defines = [ "WEBRTC_BUILD_LIBEVENT" ] 318 defines = [ "WEBRTC_BUILD_LIBEVENT" ]
296 } 319 }
297 320
298 rtc_source_set("rtc_task_queue") { 321 rtc_source_set("rtc_task_queue") {
299 deps = [ 322 deps = [
300 ":rtc_base_approved", 323 ":rtc_base_approved",
301 ] 324 ]
302 public_deps = [ 325 public_deps = [
303 ":rtc_task_queue_api", 326 ":rtc_task_queue_api",
(...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after
1074 "java/src/org/webrtc/ContextUtils.java", 1097 "java/src/org/webrtc/ContextUtils.java",
1075 "java/src/org/webrtc/Logging.java", 1098 "java/src/org/webrtc/Logging.java",
1076 "java/src/org/webrtc/Size.java", 1099 "java/src/org/webrtc/Size.java",
1077 "java/src/org/webrtc/ThreadUtils.java", 1100 "java/src/org/webrtc/ThreadUtils.java",
1078 ] 1101 ]
1079 1102
1080 # TODO(sakal): Fix build hooks crbug.com/webrtc/8148 1103 # TODO(sakal): Fix build hooks crbug.com/webrtc/8148
1081 no_build_hooks = true 1104 no_build_hooks = true
1082 } 1105 }
1083 } 1106 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698