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

Side by Side Diff: net/BUILD.gn

Issue 1287893005: Reland: Make separate net and url GN targets with and without ICU (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Brett's comments Created 5 years, 4 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 | net/net.gypi » ('j') | 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) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/crypto.gni") 5 import("//build/config/crypto.gni")
6 import("//build/config/features.gni") 6 import("//build/config/features.gni")
7 import("//build/config/ui.gni") 7 import("//build/config/ui.gni")
8 import("//build/module_args/v8.gni") 8 import("//build/module_args/v8.gni")
9 import("//url/config.gni")
10 import("//testing/test.gni") 9 import("//testing/test.gni")
11 import("//third_party/icu/config.gni") 10 import("//third_party/icu/config.gni")
12 import("//third_party/protobuf/proto_library.gni") 11 import("//third_party/protobuf/proto_library.gni")
13 12
14 # TODO(cjhopman): //build/config/android/rules.gni also imports grit_rule.gni. 13 # TODO(cjhopman): //build/config/android/rules.gni also imports grit_rule.gni.
15 # Currently, that file can't be imported multiple times. Make this always 14 # Currently, that file can't be imported multiple times. Make this always
16 # imported when http://crbug.com/393704 is fixed. 15 # imported when http://crbug.com/393704 is fixed.
17 if (!is_android) { 16 if (!is_android) {
18 import("//tools/grit/grit_rule.gni") 17 import("//tools/grit/grit_rule.gni")
19 } 18 }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 config("net_config") { 55 config("net_config") {
57 defines = [] 56 defines = []
58 if (posix_avoid_mmap) { 57 if (posix_avoid_mmap) {
59 defines += [ "POSIX_AVOID_MMAP" ] 58 defines += [ "POSIX_AVOID_MMAP" ]
60 } 59 }
61 if (disable_file_support) { 60 if (disable_file_support) {
62 defines += [ "DISABLE_FILE_SUPPORT" ] 61 defines += [ "DISABLE_FILE_SUPPORT" ]
63 } 62 }
64 } 63 }
65 64
66 component("net") { 65 # net_internal_config is shared with net and net_small.
67 sources = 66 config("net_internal_config") {
68 gypi_values.net_nacl_common_sources + gypi_values.net_non_nacl_sources
69
70 cflags = []
71 defines = [ 67 defines = [
72 # TODO(GYP) Note that the GYP file supports linux_link_kerberos (defaults to 68 # TODO(GYP) Note that the GYP file supports linux_link_kerberos (defaults to
73 # 0) which implies that we run pkg_config on kerberos and link to that 69 # 0) which implies that we run pkg_config on kerberos and link to that
74 # rather than setting this define which will dynamically open it. That 70 # rather than setting this define which will dynamically open it. That
75 # doesn't seem to be set in the regular builds, so we're skipping this 71 # doesn't seem to be set in the regular builds, so we're skipping this
76 # capability here. 72 # capability here.
77 "DLOPEN_KERBEROS", 73 "DLOPEN_KERBEROS",
78 "NET_IMPLEMENTATION", 74 "NET_IMPLEMENTATION",
79 ] 75 ]
80 76
81 configs += [
82 "//build/config:precompiled_headers",
83
84 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
85 "//build/config/compiler:no_size_t_to_int_warning",
86 ]
87 public_configs = [ ":net_config" ]
88 include_dirs = []
89
90 public_deps = [
91 ":net_quic_proto",
92 "//crypto",
93 "//crypto:platform",
94 "//url",
95 ]
96 deps = [
97 ":net_resources",
98 "//base",
99 "//base:prefs",
100 "//base/third_party/dynamic_annotations",
101 "//net/base/registry_controlled_domains",
102 "//sdch",
103 "//third_party/protobuf:protobuf_lite",
104 "//third_party/zlib",
105 "//url",
106 ]
107
108 if (use_kerberos) { 77 if (use_kerberos) {
109 defines += [ "USE_KERBEROS" ] 78 defines += [ "USE_KERBEROS" ]
110 if (is_android) { 79 if (is_android) {
111 include_dirs += [ "/usr/include/kerberosV" ] 80 include_dirs = [ "/usr/include/kerberosV" ]
112 } 81 }
113 } else {
114 sources -= [
115 "http/http_auth_gssapi_posix.cc",
116 "http/http_auth_gssapi_posix.h",
117 "http/http_auth_handler_negotiate.cc",
118 "http/http_auth_handler_negotiate.h",
119 ]
120 }
121
122 if (is_posix) {
123 if (posix_avoid_mmap) {
124 sources -= [ "disk_cache/blockfile/mapped_file_posix.cc" ]
125 } else {
126 sources -= [ "disk_cache/blockfile/mapped_file_avoid_mmap_posix.cc" ]
127 }
128 }
129
130 if (disable_file_support) {
131 sources -= [
132 "base/directory_lister.cc",
133 "base/directory_lister.h",
134 "url_request/file_protocol_handler.cc",
135 "url_request/file_protocol_handler.h",
136 "url_request/url_request_file_dir_job.cc",
137 "url_request/url_request_file_dir_job.h",
138 "url_request/url_request_file_job.cc",
139 "url_request/url_request_file_job.h",
140 ]
141 }
142
143 if (disable_ftp_support) {
144 sources -= [
145 "ftp/ftp_auth_cache.cc",
146 "ftp/ftp_auth_cache.h",
147 "ftp/ftp_ctrl_response_buffer.cc",
148 "ftp/ftp_ctrl_response_buffer.h",
149 "ftp/ftp_directory_listing_parser.cc",
150 "ftp/ftp_directory_listing_parser.h",
151 "ftp/ftp_directory_listing_parser_ls.cc",
152 "ftp/ftp_directory_listing_parser_ls.h",
153 "ftp/ftp_directory_listing_parser_netware.cc",
154 "ftp/ftp_directory_listing_parser_netware.h",
155 "ftp/ftp_directory_listing_parser_os2.cc",
156 "ftp/ftp_directory_listing_parser_os2.h",
157 "ftp/ftp_directory_listing_parser_vms.cc",
158 "ftp/ftp_directory_listing_parser_vms.h",
159 "ftp/ftp_directory_listing_parser_windows.cc",
160 "ftp/ftp_directory_listing_parser_windows.h",
161 "ftp/ftp_network_layer.cc",
162 "ftp/ftp_network_layer.h",
163 "ftp/ftp_network_session.cc",
164 "ftp/ftp_network_session.h",
165 "ftp/ftp_network_transaction.cc",
166 "ftp/ftp_network_transaction.h",
167 "ftp/ftp_request_info.h",
168 "ftp/ftp_response_info.cc",
169 "ftp/ftp_response_info.h",
170 "ftp/ftp_server_type_histograms.cc",
171 "ftp/ftp_server_type_histograms.h",
172 "ftp/ftp_transaction.h",
173 "ftp/ftp_transaction_factory.h",
174 "ftp/ftp_util.cc",
175 "ftp/ftp_util.h",
176 "url_request/ftp_protocol_handler.cc",
177 "url_request/ftp_protocol_handler.h",
178 "url_request/url_request_ftp_job.cc",
179 "url_request/url_request_ftp_job.h",
180 ]
181 } 82 }
182 83
183 if (enable_built_in_dns) { 84 if (enable_built_in_dns) {
184 defines += [ "ENABLE_BUILT_IN_DNS" ] 85 defines += [ "ENABLE_BUILT_IN_DNS" ]
86 }
87 }
88
89 # net_shared_* are settings shared between net and net_small
90 net_shared_sources =
91 gypi_values.net_nacl_common_sources + gypi_values.net_non_nacl_sources
92
93 net_shared_configs = [
94 ":net_internal_config",
95 "//build/config:precompiled_headers",
96
97 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
98 "//build/config/compiler:no_size_t_to_int_warning",
99 ]
100
101 net_shared_public_deps = [
102 ":net_quic_proto",
103 "//crypto",
104 "//crypto:platform",
105 ]
106
107 net_shared_deps = [
108 ":net_resources",
109 "//base",
110 "//base:prefs",
111 "//base/third_party/dynamic_annotations",
112 "//net/base/registry_controlled_domains",
113 "//sdch",
114 "//third_party/protobuf:protobuf_lite",
115 "//third_party/zlib",
116 ]
117
118 if (!use_kerberos) {
119 net_shared_sources -= [
120 "http/http_auth_gssapi_posix.cc",
121 "http/http_auth_gssapi_posix.h",
122 "http/http_auth_handler_negotiate.cc",
123 "http/http_auth_handler_negotiate.h",
124 ]
125 }
126
127 if (is_posix) {
128 if (posix_avoid_mmap) {
129 net_shared_sources -= [ "disk_cache/blockfile/mapped_file_posix.cc" ]
185 } else { 130 } else {
186 sources -= [ 131 net_shared_sources -=
187 "dns/address_sorter_posix.cc", 132 [ "disk_cache/blockfile/mapped_file_avoid_mmap_posix.cc" ]
188 "dns/address_sorter_posix.h", 133 }
189 "dns/dns_client.cc", 134 }
190 ] 135
191 } 136 if (!enable_built_in_dns) {
192 137 net_shared_sources -= [
193 if (use_openssl) { 138 "dns/address_sorter_posix.cc",
194 sources -= [ 139 "dns/address_sorter_posix.h",
195 "base/nss_memio.c", 140 "dns/dns_client.cc",
196 "base/nss_memio.h", 141 ]
197 "cert/ct_log_verifier_nss.cc", 142 }
198 "cert/ct_objects_extractor_nss.cc", 143
199 "cert/jwk_serializer_nss.cc", 144 if (use_openssl) {
200 "cert/scoped_nss_types.h", 145 net_shared_sources -= [
201 "cert/x509_util_nss.cc", 146 "base/nss_memio.c",
202 "quic/crypto/aead_base_decrypter_nss.cc", 147 "base/nss_memio.h",
203 "quic/crypto/aead_base_encrypter_nss.cc", 148 "cert/ct_log_verifier_nss.cc",
204 "quic/crypto/aes_128_gcm_12_decrypter_nss.cc", 149 "cert/ct_objects_extractor_nss.cc",
205 "quic/crypto/aes_128_gcm_12_encrypter_nss.cc", 150 "cert/jwk_serializer_nss.cc",
206 "quic/crypto/chacha20_poly1305_decrypter_nss.cc", 151 "cert/scoped_nss_types.h",
207 "quic/crypto/chacha20_poly1305_encrypter_nss.cc", 152 "cert/x509_util_nss.cc",
208 "quic/crypto/channel_id_nss.cc", 153 "quic/crypto/aead_base_decrypter_nss.cc",
209 "quic/crypto/p256_key_exchange_nss.cc", 154 "quic/crypto/aead_base_encrypter_nss.cc",
210 "socket/nss_ssl_util.cc", 155 "quic/crypto/aes_128_gcm_12_decrypter_nss.cc",
211 "socket/nss_ssl_util.h", 156 "quic/crypto/aes_128_gcm_12_encrypter_nss.cc",
212 "socket/ssl_client_socket_nss.cc", 157 "quic/crypto/chacha20_poly1305_decrypter_nss.cc",
213 "socket/ssl_client_socket_nss.h", 158 "quic/crypto/chacha20_poly1305_encrypter_nss.cc",
214 "socket/ssl_server_socket_nss.cc", 159 "quic/crypto/channel_id_nss.cc",
215 "socket/ssl_server_socket_nss.h", 160 "quic/crypto/p256_key_exchange_nss.cc",
216 ] 161 "socket/nss_ssl_util.cc",
217 if (is_ios) { 162 "socket/nss_ssl_util.h",
218 # Always removed for !ios below. 163 "socket/ssl_client_socket_nss.cc",
219 sources -= [ 164 "socket/ssl_client_socket_nss.h",
220 "cert/cert_verify_proc_nss.cc", 165 "socket/ssl_server_socket_nss.cc",
221 "cert/cert_verify_proc_nss.h", 166 "socket/ssl_server_socket_nss.h",
222 ] 167 ]
223 } 168 if (is_ios) {
224 if (is_win) { 169 # Always removed for !ios below.
225 sources -= [ "cert/sha256_legacy_support_nss_win.cc" ] 170 net_shared_sources -= [
226 } 171 "cert/cert_verify_proc_nss.cc",
227 if (!use_nss_certs && !is_ios) { 172 "cert/cert_verify_proc_nss.h",
228 sources -= [ "cert/x509_util_nss.h" ] 173 ]
229 } 174 }
230 } else { 175 if (is_win) {
231 sources -= [ 176 net_shared_sources -= [ "cert/sha256_legacy_support_nss_win.cc" ]
232 "cert/ct_log_verifier_openssl.cc", 177 }
233 "cert/ct_objects_extractor_openssl.cc", 178 if (!use_nss_certs && !is_ios) {
234 "cert/jwk_serializer_openssl.cc", 179 net_shared_sources -= [ "cert/x509_util_nss.h" ]
235 "cert/x509_util_openssl.cc", 180 }
236 "cert/x509_util_openssl.h", 181 } else {
237 "quic/crypto/aead_base_decrypter_openssl.cc", 182 net_shared_sources -= [
238 "quic/crypto/aead_base_encrypter_openssl.cc", 183 "cert/ct_log_verifier_openssl.cc",
239 "quic/crypto/aes_128_gcm_12_decrypter_openssl.cc", 184 "cert/ct_objects_extractor_openssl.cc",
240 "quic/crypto/aes_128_gcm_12_encrypter_openssl.cc", 185 "cert/jwk_serializer_openssl.cc",
241 "quic/crypto/chacha20_poly1305_decrypter_openssl.cc", 186 "cert/x509_util_openssl.cc",
242 "quic/crypto/chacha20_poly1305_encrypter_openssl.cc", 187 "cert/x509_util_openssl.h",
243 "quic/crypto/channel_id_openssl.cc", 188 "quic/crypto/aead_base_decrypter_openssl.cc",
244 "quic/crypto/p256_key_exchange_openssl.cc", 189 "quic/crypto/aead_base_encrypter_openssl.cc",
245 "quic/crypto/scoped_evp_aead_ctx.cc", 190 "quic/crypto/aes_128_gcm_12_decrypter_openssl.cc",
246 "quic/crypto/scoped_evp_aead_ctx.h", 191 "quic/crypto/aes_128_gcm_12_encrypter_openssl.cc",
247 "socket/ssl_client_socket_openssl.cc", 192 "quic/crypto/chacha20_poly1305_decrypter_openssl.cc",
248 "socket/ssl_client_socket_openssl.h", 193 "quic/crypto/chacha20_poly1305_encrypter_openssl.cc",
249 "socket/ssl_server_socket_openssl.cc", 194 "quic/crypto/channel_id_openssl.cc",
250 "socket/ssl_server_socket_openssl.h", 195 "quic/crypto/p256_key_exchange_openssl.cc",
251 "ssl/openssl_ssl_util.cc", 196 "quic/crypto/scoped_evp_aead_ctx.cc",
252 "ssl/openssl_ssl_util.h", 197 "quic/crypto/scoped_evp_aead_ctx.h",
253 "ssl/ssl_client_session_cache_openssl.cc", 198 "socket/ssl_client_socket_openssl.cc",
254 "ssl/ssl_client_session_cache_openssl.h", 199 "socket/ssl_client_socket_openssl.h",
255 "ssl/ssl_platform_key.h", 200 "socket/ssl_server_socket_openssl.cc",
256 "ssl/threaded_ssl_private_key.cc", 201 "socket/ssl_server_socket_openssl.h",
257 "ssl/threaded_ssl_private_key.h", 202 "ssl/openssl_ssl_util.cc",
258 ] 203 "ssl/openssl_ssl_util.h",
259 if (is_mac) { 204 "ssl/ssl_client_session_cache_openssl.cc",
260 sources -= [ "ssl/ssl_platform_key_mac.cc" ] 205 "ssl/ssl_client_session_cache_openssl.h",
261 } 206 "ssl/ssl_platform_key.h",
262 if (is_win) { 207 "ssl/threaded_ssl_private_key.cc",
263 sources -= [ 208 "ssl/threaded_ssl_private_key.h",
264 "cert/sha256_legacy_support_openssl_win.cc", 209 ]
265 "ssl/ssl_platform_key_win.cc", 210 if (is_mac) {
266 ] 211 net_shared_sources -= [ "ssl/ssl_platform_key_mac.cc" ]
267 } 212 }
268 if (use_nss_certs) { 213 if (is_win) {
269 sources -= [ "ssl/ssl_platform_key_nss.cc" ] 214 net_shared_sources -= [
270 } 215 "cert/sha256_legacy_support_openssl_win.cc",
271 } 216 "ssl/ssl_platform_key_win.cc",
272 217 ]
273 if (!use_openssl_certs) { 218 }
274 sources -= [ 219 if (use_nss_certs) {
275 "base/crypto_module_openssl.cc", 220 net_shared_sources -= [ "ssl/ssl_platform_key_nss.cc" ]
276 "base/keygen_handler_openssl.cc", 221 }
277 "base/openssl_private_key_store.h", 222 }
223
224 if (!use_openssl_certs) {
225 net_shared_sources -= [
226 "base/crypto_module_openssl.cc",
227 "base/keygen_handler_openssl.cc",
228 "base/openssl_private_key_store.h",
229 "base/openssl_private_key_store_memory.cc",
230 "cert/cert_database_openssl.cc",
231 "cert/cert_verify_proc_openssl.cc",
232 "cert/cert_verify_proc_openssl.h",
233 "cert/test_root_certs_openssl.cc",
234 "cert/x509_certificate_openssl.cc",
235 "ssl/openssl_client_key_store.cc",
236 "ssl/openssl_client_key_store.h",
237 ]
238 if (is_android) {
239 net_shared_sources -= [ "base/openssl_private_key_store_android.cc" ]
240 }
241 } else {
242 if (is_android) {
243 # Android doesn't use these even when using OpenSSL.
244 net_shared_sources -= [
278 "base/openssl_private_key_store_memory.cc", 245 "base/openssl_private_key_store_memory.cc",
279 "cert/cert_database_openssl.cc", 246 "cert/cert_database_openssl.cc",
280 "cert/cert_verify_proc_openssl.cc", 247 "cert/cert_verify_proc_openssl.cc",
281 "cert/cert_verify_proc_openssl.h",
282 "cert/test_root_certs_openssl.cc", 248 "cert/test_root_certs_openssl.cc",
283 "cert/x509_certificate_openssl.cc", 249 ]
284 "ssl/openssl_client_key_store.cc", 250 }
285 "ssl/openssl_client_key_store.h", 251
286 ] 252 # TODO(davidben): Remove these exclusions when use_openssl_certs builds also
287 if (is_android) { 253 # use the SSLPrivateKey machinery.
288 sources -= [ "base/openssl_private_key_store_android.cc" ] 254 net_shared_sources -= [
289 } 255 "ssl/threaded_ssl_private_key.cc",
290 } else { 256 "ssl/threaded_ssl_private_key.h",
291 if (is_android) { 257 ]
292 # Android doesn't use these even when using OpenSSL. 258 }
293 sources -= [ 259
294 "base/openssl_private_key_store_memory.cc", 260 if (use_glib && !is_chromeos) {
295 "cert/cert_database_openssl.cc", 261 net_shared_configs += [ "//build/config/linux:gconf" ]
296 "cert/cert_verify_proc_openssl.cc", 262 net_shared_deps += [ "//build/config/linux:gio" ]
297 "cert/test_root_certs_openssl.cc", 263 }
298 ] 264
299 } 265 if (is_linux) {
300 266 net_shared_configs += [ "//build/config/linux:libresolv" ]
301 # TODO(davidben): Remove these exclusions when use_openssl_certs builds also 267 }
302 # use the SSLPrivateKey machinery. 268
303 sources -= [ 269 if (!use_nss_certs) {
304 "ssl/threaded_ssl_private_key.cc", 270 net_shared_sources -= [
305 "ssl/threaded_ssl_private_key.h", 271 "base/crypto_module_nss.cc",
306 ] 272 "base/keygen_handler_nss.cc",
307 } 273 "cert/cert_database_nss.cc",
308 274 "cert/nss_cert_database.cc",
309 if (use_glib && !is_chromeos) { 275 "cert/nss_cert_database.h",
310 configs += [ "//build/config/linux:gconf" ] 276 "cert/x509_certificate_nss.cc",
311 deps += [ "//build/config/linux:gio" ] 277 "ssl/client_cert_store_nss.cc",
312 } 278 "ssl/client_cert_store_nss.h",
313 279 "third_party/mozilla_security_manager/nsKeygenHandler.cpp",
314 if (is_linux) { 280 "third_party/mozilla_security_manager/nsKeygenHandler.h",
315 configs += [ "//build/config/linux:libresolv" ] 281 "third_party/mozilla_security_manager/nsNSSCertificateDB.cpp",
316 } 282 "third_party/mozilla_security_manager/nsNSSCertificateDB.h",
317 283 "third_party/mozilla_security_manager/nsPKCS12Blob.cpp",
318 if (!use_nss_certs) { 284 "third_party/mozilla_security_manager/nsPKCS12Blob.h",
319 sources -= [ 285 ]
320 "base/crypto_module_nss.cc", 286 if (!is_ios) {
321 "base/keygen_handler_nss.cc", 287 # These files are part of the partial implementation of NSS on iOS so
322 "cert/cert_database_nss.cc", 288 # keep them in that case (even though use_nss_certs is not set).
323 "cert/nss_cert_database.cc", 289 net_shared_sources -= [
324 "cert/nss_cert_database.h", 290 "cert/cert_verify_proc_nss.cc",
325 "cert/x509_certificate_nss.cc", 291 "cert/cert_verify_proc_nss.h",
326 "ssl/client_cert_store_nss.cc", 292 "cert/test_root_certs_nss.cc",
327 "ssl/client_cert_store_nss.h", 293 "cert/x509_util_nss_certs.cc",
328 "third_party/mozilla_security_manager/nsKeygenHandler.cpp", 294 "cert_net/nss_ocsp.cc",
329 "third_party/mozilla_security_manager/nsKeygenHandler.h", 295 "cert_net/nss_ocsp.h",
330 "third_party/mozilla_security_manager/nsNSSCertificateDB.cpp", 296 ]
331 "third_party/mozilla_security_manager/nsNSSCertificateDB.h", 297 }
332 "third_party/mozilla_security_manager/nsPKCS12Blob.cpp", 298 if (is_chromeos) {
333 "third_party/mozilla_security_manager/nsPKCS12Blob.h", 299 # These were already removed on non-ChromeOS.
334 ] 300 net_shared_sources -= [
335 if (!is_ios) { 301 "cert/nss_cert_database_chromeos.cc",
336 # These files are part of the partial implementation of NSS on iOS so 302 "cert/nss_cert_database_chromeos.h",
337 # keep them in that case (even though use_nss_certs is not set). 303 "cert/nss_profile_filter_chromeos.cc",
338 sources -= [ 304 "cert/nss_profile_filter_chromeos.h",
339 "cert/cert_verify_proc_nss.cc", 305 ]
340 "cert/cert_verify_proc_nss.h", 306 }
341 "cert/test_root_certs_nss.cc", 307 net_shared_sources -= [ "ssl/ssl_platform_key_nss.cc" ]
342 "cert/x509_util_nss_certs.cc", 308 } else if (use_openssl) {
343 "cert_net/nss_ocsp.cc", 309 # client_cert_store_nss.c requires NSS_CmpCertChainWCANames from NSS's
344 "cert_net/nss_ocsp.h", 310 # libssl, but our bundled copy is not built in OpenSSL ports. Pull that file
345 ] 311 # in directly.
346 } 312 net_shared_sources += [ "third_party/nss/ssl/cmpcert.c" ]
347 if (is_chromeos) { 313 }
348 # These were already removed on non-ChromeOS. 314
349 sources -= [ 315 if (!enable_mdns) {
350 "cert/nss_cert_database_chromeos.cc", 316 net_shared_sources -= [
351 "cert/nss_cert_database_chromeos.h", 317 "dns/mdns_cache.cc",
352 "cert/nss_profile_filter_chromeos.cc", 318 "dns/mdns_cache.h",
353 "cert/nss_profile_filter_chromeos.h", 319 "dns/mdns_client.cc",
354 ] 320 "dns/mdns_client.h",
355 } 321 "dns/mdns_client_impl.cc",
356 sources -= [ "ssl/ssl_platform_key_nss.cc" ] 322 "dns/mdns_client_impl.h",
357 } else if (use_openssl) { 323 "dns/record_parsed.cc",
358 # client_cert_store_nss.c requires NSS_CmpCertChainWCANames from NSS's 324 "dns/record_parsed.h",
359 # libssl, but our bundled copy is not built in OpenSSL ports. Pull that file 325 "dns/record_rdata.cc",
360 # in directly. 326 "dns/record_rdata.h",
361 sources += [ "third_party/nss/ssl/cmpcert.c" ] 327 ]
362 } 328 }
363 329
364 if (!enable_websockets) { 330 if (is_win) {
365 sources -= [ 331 net_shared_sources -= [
366 "websockets/websocket_basic_handshake_stream.cc", 332 "http/http_auth_handler_ntlm_portable.cc",
367 "websockets/websocket_basic_handshake_stream.h", 333 "socket/socket_libevent.cc",
368 "websockets/websocket_basic_stream.cc", 334 "socket/socket_libevent.h",
369 "websockets/websocket_basic_stream.h", 335 "socket/tcp_socket_libevent.cc",
370 "websockets/websocket_channel.cc", 336 "socket/tcp_socket_libevent.h",
371 "websockets/websocket_channel.h", 337 "udp/udp_socket_libevent.cc",
372 "websockets/websocket_deflate_predictor.h", 338 "udp/udp_socket_libevent.h",
373 "websockets/websocket_deflate_predictor_impl.cc", 339 ]
374 "websockets/websocket_deflate_predictor_impl.h", 340 } else { # !is_win
375 "websockets/websocket_deflate_stream.cc", 341 net_shared_sources -= [
376 "websockets/websocket_deflate_stream.h", 342 "base/winsock_init.cc",
377 "websockets/websocket_deflater.cc", 343 "base/winsock_init.h",
378 "websockets/websocket_deflater.h", 344 "base/winsock_util.cc",
379 "websockets/websocket_errors.cc", 345 "base/winsock_util.h",
380 "websockets/websocket_errors.h", 346 "proxy/proxy_resolver_winhttp.cc",
381 "websockets/websocket_extension.cc", 347 "proxy/proxy_resolver_winhttp.h",
382 "websockets/websocket_extension.h", 348 ]
383 "websockets/websocket_extension_parser.cc", 349 }
384 "websockets/websocket_extension_parser.h", 350
385 "websockets/websocket_frame.cc", 351 if (is_ios) {
386 "websockets/websocket_frame.h", 352 # Add back some sources that were otherwise filtered out. iOS needs some Mac
387 "websockets/websocket_frame_parser.cc", 353 # files.
388 "websockets/websocket_frame_parser.h", 354 set_sources_assignment_filter([])
389 "websockets/websocket_handshake_challenge.cc", 355 net_shared_sources += [
390 "websockets/websocket_handshake_challenge.h", 356 "base/mac/url_conversions.h",
391 "websockets/websocket_handshake_constants.cc", 357 "base/mac/url_conversions.mm",
392 "websockets/websocket_handshake_constants.h", 358 "base/network_change_notifier_mac.cc",
393 "websockets/websocket_handshake_request_info.cc", 359 "base/network_config_watcher_mac.cc",
394 "websockets/websocket_handshake_request_info.h", 360 "base/network_interfaces_mac.cc",
395 "websockets/websocket_handshake_response_info.cc", 361 "base/network_interfaces_mac.h",
396 "websockets/websocket_handshake_response_info.h", 362 "base/platform_mime_util_mac.mm",
397 "websockets/websocket_handshake_stream_base.h", 363 "proxy/proxy_resolver_mac.cc",
398 "websockets/websocket_handshake_stream_create_helper.cc", 364 "proxy/proxy_server_mac.cc",
399 "websockets/websocket_handshake_stream_create_helper.h", 365 ]
400 "websockets/websocket_inflater.cc", 366 set_sources_assignment_filter(sources_assignment_filter)
mmenke 2015/08/26 17:53:33 You're duplicating most of this block below. I be
xunjieli 2015/08/27 13:04:42 Done.
401 "websockets/websocket_inflater.h", 367
402 "websockets/websocket_mux.h", 368 net_shared_sources -= [ "disk_cache/blockfile/file_posix.cc" ]
403 "websockets/websocket_stream.cc", 369 net_shared_deps += [
404 "websockets/websocket_stream.h", 370 "//third_party/nss:nspr",
405 ] 371 "//third_party/nss",
406 } 372 "//net/third_party/nss/ssl:libssl",
407 373 ]
408 if (!enable_mdns) { 374 }
409 sources -= [ 375
410 "dns/mdns_cache.cc", 376 if (is_ios || is_mac) {
411 "dns/mdns_cache.h", 377 net_shared_sources += gypi_values.net_base_mac_ios_sources
412 "dns/mdns_client.cc", 378 }
413 "dns/mdns_client.h", 379
414 "dns/mdns_client_impl.cc", 380 if (is_android) {
415 "dns/mdns_client_impl.h", 381 net_shared_deps += [ ":net_jni_headers" ]
416 "dns/record_parsed.cc", 382 }
417 "dns/record_parsed.h", 383
418 "dns/record_rdata.cc", 384 component("net") {
419 "dns/record_rdata.h", 385 sources = net_shared_sources
420 ] 386 cflags = []
421 } 387 configs += net_shared_configs
422 388 public_configs = [ ":net_config" ]
423 if (is_win) { 389
424 sources -= [ 390 public_deps = net_shared_public_deps + [ "//url:url" ]
425 "http/http_auth_handler_ntlm_portable.cc", 391 deps = net_shared_deps
426 "socket/socket_libevent.cc", 392
427 "socket/socket_libevent.h", 393 if (is_android) {
428 "socket/tcp_socket_libevent.cc", 394 # Add some Linux sources that were excluded by the filter, but which
429 "socket/tcp_socket_libevent.h", 395 # are needed.
430 "udp/udp_socket_libevent.cc", 396 set_sources_assignment_filter([])
431 "udp/udp_socket_libevent.h", 397 sources += [
432 ] 398 "base/address_tracker_linux.cc",
433 } else { # !is_win 399 "base/address_tracker_linux.h",
434 sources -= [ 400 "base/network_interfaces_linux.cc",
435 "base/winsock_init.cc", 401 "base/network_interfaces_linux.h",
436 "base/winsock_init.h", 402 "base/platform_mime_util_linux.cc",
437 "base/winsock_util.cc", 403 ]
438 "base/winsock_util.h", 404 set_sources_assignment_filter(sources_assignment_filter)
439 "proxy/proxy_resolver_winhttp.cc",
440 "proxy/proxy_resolver_winhttp.h",
441 ]
442 } 405 }
443 406
444 if (is_mac) { 407 if (is_mac) {
445 libs = [ 408 libs = [
446 "Foundation.framework", 409 "Foundation.framework",
447 "Security.framework", 410 "Security.framework",
448 "SystemConfiguration.framework", 411 "SystemConfiguration.framework",
449 "resolv", 412 "resolv",
450 ] 413 ]
451 } 414 }
452 415
453 if (is_ios) { 416 if (is_ios) {
454 # Add back some sources that were otherwise filtered out. iOS needs some Mac 417 # Add back some sources that were otherwise filtered out. iOS needs some Mac
455 # files. 418 # files.
456 set_sources_assignment_filter([]) 419 set_sources_assignment_filter([])
457 sources += [ 420 sources += [
458 "base/mac/url_conversions.h", 421 "base/mac/url_conversions.h",
459 "base/mac/url_conversions.mm", 422 "base/mac/url_conversions.mm",
460 "base/network_change_notifier_mac.cc", 423 "base/network_change_notifier_mac.cc",
461 "base/network_config_watcher_mac.cc", 424 "base/network_config_watcher_mac.cc",
462 "base/network_interfaces_mac.cc", 425 "base/network_interfaces_mac.cc",
463 "base/network_interfaces_mac.h", 426 "base/network_interfaces_mac.h",
464 "base/platform_mime_util_mac.mm", 427 "base/platform_mime_util_mac.mm",
465 "proxy/proxy_resolver_mac.cc", 428 "proxy/proxy_resolver_mac.cc",
466 "proxy/proxy_server_mac.cc", 429 "proxy/proxy_server_mac.cc",
467 ] 430 ]
mmenke 2015/08/26 17:53:33 Most of this block appears in both the shared scop
xunjieli 2015/08/27 13:04:42 Done.
468 set_sources_assignment_filter(sources_assignment_filter) 431 set_sources_assignment_filter(sources_assignment_filter)
469 432
470 sources -= [ "disk_cache/blockfile/file_posix.cc" ]
471 libs = [ 433 libs = [
472 "CFNetwork.framework", 434 "CFNetwork.framework",
473 "MobileCoreServices.framework", 435 "MobileCoreServices.framework",
474 "Security.framework", 436 "Security.framework",
475 "SystemConfiguration.framework", 437 "SystemConfiguration.framework",
476 "resolv", 438 "resolv",
477 ] 439 ]
478
479 deps += [
480 "//third_party/nss:nspr",
481 "//third_party/nss",
482 "//net/third_party/nss/ssl:libssl",
483 ]
484 } 440 }
485 441
486 if (is_ios || is_mac) { 442 if (!disable_file_support) {
487 sources += gypi_values.net_base_mac_ios_sources 443 sources += gypi_values.net_file_support_sources
488 } 444 }
489 445
490 if (is_android) { 446 if (!disable_ftp_support) {
447 sources += gypi_values.net_ftp_support_sources
448 }
449
450 if (enable_websockets) {
451 sources += gypi_values.net_websockets_sources
452 }
453
454 # ICU support.
455 deps += [
456 "//base:i18n",
457 "//third_party/icu",
458 ]
459 sources += [
460 "base/filename_util_icu.cc",
461 "base/net_string_util_icu.cc",
462 "base/net_util_icu.cc",
463 ]
464 }
465
466 if (is_android) {
467 # Same as net, but with ICU, file, ftp, and websocket support stripped.
468 component("net_small") {
469 sources = net_shared_sources
470 cflags = []
471 defines = []
472 configs += net_shared_configs
473 public_configs = [ ":net_config" ]
474
475 public_deps = net_shared_public_deps +
476 [ "//url:url_lib_use_icu_alternatives_on_android" ]
477 deps = net_shared_deps + [ ":net_jni_headers" ]
478
491 # Add some Linux sources that were excluded by the filter, but which 479 # Add some Linux sources that were excluded by the filter, but which
492 # are needed. 480 # are needed.
493 set_sources_assignment_filter([]) 481 set_sources_assignment_filter([])
494 sources += [ 482 sources += [
495 "base/address_tracker_linux.cc", 483 "base/address_tracker_linux.cc",
496 "base/address_tracker_linux.h", 484 "base/address_tracker_linux.h",
497 "base/network_interfaces_linux.cc", 485 "base/network_interfaces_linux.cc",
498 "base/network_interfaces_linux.h", 486 "base/network_interfaces_linux.h",
499 "base/platform_mime_util_linux.cc", 487 "base/platform_mime_util_linux.cc",
500 ] 488 ]
501 set_sources_assignment_filter(sources_assignment_filter) 489 set_sources_assignment_filter(sources_assignment_filter)
502 deps += [ ":net_jni_headers" ]
503 }
504 490
505 if (use_icu_alternatives_on_android) { 491 defines += [
492 "DISABLE_FILE_SUPPORT",
493 "DISABLE_FTP_SUPPORT",
494 "USE_ICU_ALTERNATIVES_ON_ANDROID=1",
495 ]
496
497 # Use ICU alternative on Android.
506 sources += [ 498 sources += [
507 "base/net_string_util_icu_alternatives_android.cc", 499 "base/net_string_util_icu_alternatives_android.cc",
508 "base/net_string_util_icu_alternatives_android.h", 500 "base/net_string_util_icu_alternatives_android.h",
509 ] 501 ]
510 } else {
511 deps += [
512 "//base:i18n",
513 "//third_party/icu",
514 ]
515 sources += [
516 "base/filename_util_icu.cc",
517 "base/net_string_util_icu.cc",
518 "base/net_util_icu.cc",
519 ]
520 } 502 }
521 } 503 }
522 504
523 grit("net_resources") { 505 grit("net_resources") {
524 source = "base/net_resources.grd" 506 source = "base/net_resources.grd"
525 use_qualified_include = true 507 use_qualified_include = true
526 outputs = [ 508 outputs = [
527 "grit/net_resources.h", 509 "grit/net_resources.h",
528 "net_resources.pak", 510 "net_resources.pak",
529 ] 511 ]
530 } 512 }
531 513
532 proto_library("net_quic_proto") { 514 proto_library("net_quic_proto") {
533 visibility = [ "//net" ] # Part of the net component. 515 visibility = [
516 ":net",
517 ":net_small",
518 ]
534 519
535 sources = [ 520 sources = [
536 "quic/proto/cached_network_parameters.proto", 521 "quic/proto/cached_network_parameters.proto",
537 "quic/proto/source_address_token.proto", 522 "quic/proto/source_address_token.proto",
538 ] 523 ]
539 cc_generator_options = "dllexport_decl=NET_EXPORT_PRIVATE:" 524 cc_generator_options = "dllexport_decl=NET_EXPORT_PRIVATE:"
540 cc_include = "net/base/net_export.h" 525 cc_include = "net/base/net_export.h"
541 526
542 defines = [ "NET_IMPLEMENTATION" ] 527 defines = [ "NET_IMPLEMENTATION" ]
543 528
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
1215 1200
1216 if (is_android) { 1201 if (is_android) {
1217 generate_jni("net_jni_headers") { 1202 generate_jni("net_jni_headers") {
1218 sources = [ 1203 sources = [
1219 "android/java/src/org/chromium/net/AndroidCertVerifyResult.java", 1204 "android/java/src/org/chromium/net/AndroidCertVerifyResult.java",
1220 "android/java/src/org/chromium/net/AndroidKeyStore.java", 1205 "android/java/src/org/chromium/net/AndroidKeyStore.java",
1221 "android/java/src/org/chromium/net/AndroidNetworkLibrary.java", 1206 "android/java/src/org/chromium/net/AndroidNetworkLibrary.java",
1222 "android/java/src/org/chromium/net/AndroidPrivateKey.java", 1207 "android/java/src/org/chromium/net/AndroidPrivateKey.java",
1223 "android/java/src/org/chromium/net/GURLUtils.java", 1208 "android/java/src/org/chromium/net/GURLUtils.java",
1224 "android/java/src/org/chromium/net/HttpNegotiateAuthenticator.java", 1209 "android/java/src/org/chromium/net/HttpNegotiateAuthenticator.java",
1210 "android/java/src/org/chromium/net/NetStringUtil.java",
1225 "android/java/src/org/chromium/net/NetworkChangeNotifier.java", 1211 "android/java/src/org/chromium/net/NetworkChangeNotifier.java",
1226 "android/java/src/org/chromium/net/ProxyChangeListener.java", 1212 "android/java/src/org/chromium/net/ProxyChangeListener.java",
1227 "android/java/src/org/chromium/net/X509Util.java", 1213 "android/java/src/org/chromium/net/X509Util.java",
1228 ] 1214 ]
1229 jni_package = "net" 1215 jni_package = "net"
1230 } 1216 }
1231 generate_jni("net_test_jni_headers") { 1217 generate_jni("net_test_jni_headers") {
1232 sources = [ 1218 sources = [
1233 "android/javatests/src/org/chromium/net/AndroidKeyStoreTestUtil.java", 1219 "android/javatests/src/org/chromium/net/AndroidKeyStoreTestUtil.java",
1234 "test/android/javatests/src/org/chromium/net/test/DummySpnegoAuthenticator .java", 1220 "test/android/javatests/src/org/chromium/net/test/DummySpnegoAuthenticator .java",
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
1520 ] 1506 ]
1521 } 1507 }
1522 1508
1523 if (!enable_built_in_dns) { 1509 if (!enable_built_in_dns) {
1524 sources -= [ 1510 sources -= [
1525 "dns/address_sorter_posix_unittest.cc", 1511 "dns/address_sorter_posix_unittest.cc",
1526 "dns/address_sorter_unittest.cc", 1512 "dns/address_sorter_unittest.cc",
1527 ] 1513 ]
1528 } 1514 }
1529 1515
1530 # Always need use_v8_in_net to be 1 to run on Android, so just remove 1516 if (use_v8_in_net) {
1531 # net_unittest's dependency on v8 when using icu alternatives instead of
1532 # setting use_v8_in_net to 0.
1533 if (use_v8_in_net && !use_icu_alternatives_on_android) {
1534 deps += [ ":net_with_v8" ] 1517 deps += [ ":net_with_v8" ]
1535 } else { 1518 } else {
1536 sources -= [ 1519 sources -= [
1537 "proxy/proxy_resolver_v8_tracing_unittest.cc", 1520 "proxy/proxy_resolver_v8_tracing_unittest.cc",
1538 "proxy/proxy_resolver_v8_tracing_wrapper_unittest.cc", 1521 "proxy/proxy_resolver_v8_tracing_wrapper_unittest.cc",
1539 "proxy/proxy_resolver_v8_unittest.cc", 1522 "proxy/proxy_resolver_v8_unittest.cc",
1540 ] 1523 ]
1541 } 1524 }
1542 1525
1543 if (use_v8_in_net && !is_android) { 1526 if (use_v8_in_net && !is_android) {
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
1632 # TODO(mmenke): This depends on test_support_base, which depends on 1615 # TODO(mmenke): This depends on test_support_base, which depends on
1633 # icu. Figure out a way to remove that dependency. 1616 # icu. Figure out a way to remove that dependency.
1634 "//testing/android/native_test:native_test_native_code", 1617 "//testing/android/native_test:native_test_native_code",
1635 ] 1618 ]
1636 set_sources_assignment_filter([]) 1619 set_sources_assignment_filter([])
1637 sources += [ "base/address_tracker_linux_unittest.cc" ] 1620 sources += [ "base/address_tracker_linux_unittest.cc" ]
1638 set_sources_assignment_filter(sources_assignment_filter) 1621 set_sources_assignment_filter(sources_assignment_filter)
1639 isolate_file = "net_unittests.isolate" 1622 isolate_file = "net_unittests.isolate"
1640 } 1623 }
1641 1624
1642 if (use_icu_alternatives_on_android) {
1643 sources -= [
1644 "base/filename_util_unittest.cc",
1645 "base/net_util_icu_unittest.cc",
1646 ]
1647 deps -= [ "//base:i18n" ]
1648 }
1649
1650 # Symbols for crashes when running tests on swarming. 1625 # Symbols for crashes when running tests on swarming.
1651 if (symbol_level > 0) { 1626 if (symbol_level > 0) {
1652 if (is_win) { 1627 if (is_win) {
1653 data += [ "$root_out_dir/net_unittests.exe.pdb" ] 1628 data += [ "$root_out_dir/net_unittests.exe.pdb" ]
1654 } else if (is_mac) { 1629 } else if (is_mac) {
1655 data += [ "$root_out_dir/net_unittests.dSYM/" ] 1630 data += [ "$root_out_dir/net_unittests.dSYM/" ]
1656 } 1631 }
1657 } 1632 }
1658 } 1633 }
1659 1634
(...skipping 26 matching lines...) Expand all
1686 if (enable_websockets) { 1661 if (enable_websockets) {
1687 sources += [ "websockets/websocket_frame_perftest.cc" ] 1662 sources += [ "websockets/websocket_frame_perftest.cc" ]
1688 } 1663 }
1689 1664
1690 if (use_v8_in_net) { 1665 if (use_v8_in_net) {
1691 deps += [ ":net_with_v8" ] 1666 deps += [ ":net_with_v8" ]
1692 } else { 1667 } else {
1693 sources -= [ "proxy/proxy_resolver_perftest.cc" ] 1668 sources -= [ "proxy/proxy_resolver_perftest.cc" ]
1694 } 1669 }
1695 } 1670 }
OLDNEW
« no previous file with comments | « no previous file | net/net.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698