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

Side by Side Diff: build/secondary/third_party/libsrtp/BUILD.gn

Issue 1180693002: Update from https://crrev.com/333737 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 5 years, 6 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 | « build/secondary/third_party/freetype/BUILD.gn ('k') | build/secondary/tools/grit/grit_rule.gni » ('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 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 declare_args() { 5 declare_args() {
6 use_system_libsrtp = false 6 use_system_libsrtp = false
7 use_srtp_boringssl = true
7 } 8 }
8 9
9 config("libsrtp_config") { 10 config("libsrtp_config") {
10 defines = [ 11 defines = [
12 "HAVE_CONFIG_H",
11 "HAVE_STDLIB_H", 13 "HAVE_STDLIB_H",
12 "HAVE_STRING_H", 14 "HAVE_STRING_H",
15 "TESTAPP_SOURCE",
13 ] 16 ]
14 17
15 include_dirs = [ 18 include_dirs = [
16 "config", 19 "config",
17 "srtp/include", 20 "srtp/include",
18 "srtp/crypto/include", 21 "srtp/crypto/include",
19 ] 22 ]
20 23
24 if (use_srtp_boringssl) {
25 defines += [ "OPENSSL" ]
26 }
27
21 if (is_posix) { 28 if (is_posix) {
22 defines += [ 29 defines += [
23 "HAVE_INT16_T", 30 "HAVE_INT16_T",
24 "HAVE_INT32_T", 31 "HAVE_INT32_T",
25 "HAVE_INT8_T", 32 "HAVE_INT8_T",
26 "HAVE_UINT16_T", 33 "HAVE_UINT16_T",
27 "HAVE_UINT32_T", 34 "HAVE_UINT32_T",
28 "HAVE_UINT64_T", 35 "HAVE_UINT64_T",
29 "HAVE_UINT8_T", 36 "HAVE_UINT8_T",
30 "HAVE_STDINT_H", 37 "HAVE_STDINT_H",
31 "HAVE_INTTYPES_H", 38 "HAVE_INTTYPES_H",
32 "HAVE_NETINET_IN_H", 39 "HAVE_NETINET_IN_H",
33 "INLINE=inline", 40 "HAVE_ARPA_INET_H",
41 "HAVE_UNISTD_H",
34 ] 42 ]
43 cflags = [ "-Wno-unused-variable" ]
35 } 44 }
36 45
37 if (is_win) { 46 if (is_win) {
38 defines += [ 47 defines += [
39 "INLINE=__inline",
40 "HAVE_BYTESWAP_METHODS_H", 48 "HAVE_BYTESWAP_METHODS_H",
41 49
42 # All Windows architectures are this way. 50 # All Windows architectures are this way.
43 "SIZEOF_UNSIGNED_LONG=4", 51 "SIZEOF_UNSIGNED_LONG=4",
44 "SIZEOF_UNSIGNED_LONG_LONG=8", 52 "SIZEOF_UNSIGNED_LONG_LONG=8",
45 ] 53 ]
46 } 54 }
47 55
48 if (current_cpu == "x64" || current_cpu == "x86" || current_cpu == "arm") { 56 if (current_cpu == "x64" || current_cpu == "x86" || current_cpu == "arm") {
49 defines += [ 57 defines += [
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 "srtp/crypto/rng/ctr_prng.c", 150 "srtp/crypto/rng/ctr_prng.c",
143 "srtp/crypto/rng/prng.c", 151 "srtp/crypto/rng/prng.c",
144 "srtp/crypto/rng/rand_source.c", 152 "srtp/crypto/rng/rand_source.c",
145 "srtp/srtp/ekt.c", 153 "srtp/srtp/ekt.c",
146 "srtp/srtp/srtp.c", 154 "srtp/srtp/srtp.c",
147 ] 155 ]
148 156
149 if (is_clang) { 157 if (is_clang) {
150 cflags = [ "-Wno-implicit-function-declaration" ] 158 cflags = [ "-Wno-implicit-function-declaration" ]
151 } 159 }
160
161 if (use_srtp_boringssl) {
162 deps = [
163 "//third_party/boringssl:boringssl",
164 ]
165 public_deps = [
166 "//third_party/boringssl:boringssl",
167 ]
168 sources -= [
169 "srtp/crypto/cipher/aes_cbc.c",
170 "srtp/crypto/cipher/aes_icm.c",
171 "srtp/crypto/hash/hmac.c",
172 "srtp/crypto/hash/sha1.c",
173 "srtp/crypto/rng/ctr_prng.c",
174 "srtp/crypto/rng/prng.c",
175 ]
176 sources += [
177 "srtp/crypto/cipher/aes_gcm_ossl.c",
178 "srtp/crypto/cipher/aes_icm_ossl.c",
179 "srtp/crypto/hash/hmac_ossl.c",
180 "srtp/crypto/include/aes_gcm_ossl.h",
181 "srtp/crypto/include/aes_icm_ossl.h",
182 ]
183 }
152 } 184 }
153 185
154 # TODO(GYP): A bunch of these tests don't compile (in gyp either). They're 186 # TODO(GYP): A bunch of these tests don't compile (in gyp either). They're
155 # not very broken, so could probably be made to work if it's useful. 187 # not very broken, so could probably be made to work if it's useful.
156 if (!is_win) { 188 if (!is_win) {
157 executable("rdbx_driver") { 189 executable("rdbx_driver") {
158 configs -= [ "//build/config/compiler:chromium_code" ] 190 configs -= [ "//build/config/compiler:chromium_code" ]
159 configs += [ "//build/config/compiler:no_chromium_code" ] 191 configs += [ "//build/config/compiler:no_chromium_code" ]
160 deps = [ 192 deps = [
161 ":libsrtp", 193 ":libsrtp",
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 } 263 }
232 264
233 executable("srtp_test_cipher_driver") { 265 executable("srtp_test_cipher_driver") {
234 configs -= [ "//build/config/compiler:chromium_code" ] 266 configs -= [ "//build/config/compiler:chromium_code" ]
235 configs += [ "//build/config/compiler:no_chromium_code" ] 267 configs += [ "//build/config/compiler:no_chromium_code" ]
236 deps = [ 268 deps = [
237 ":libsrtp", 269 ":libsrtp",
238 ] 270 ]
239 sources = [ 271 sources = [
240 "srtp/crypto/test/cipher_driver.c", 272 "srtp/crypto/test/cipher_driver.c",
273 "srtp/include/getopt_s.h",
274 "srtp/test/getopt_s.c",
241 ] 275 ]
242 } 276 }
243 277
244 executable("srtp_test_datatypes_driver") { 278 executable("srtp_test_datatypes_driver") {
245 configs -= [ "//build/config/compiler:chromium_code" ] 279 configs -= [ "//build/config/compiler:chromium_code" ]
246 configs += [ "//build/config/compiler:no_chromium_code" ] 280 configs += [ "//build/config/compiler:no_chromium_code" ]
247 deps = [ 281 deps = [
248 ":libsrtp", 282 ":libsrtp",
249 ] 283 ]
250 sources = [ 284 sources = [
(...skipping 24 matching lines...) Expand all
275 } 309 }
276 310
277 executable("srtp_test_kernel_driver") { 311 executable("srtp_test_kernel_driver") {
278 configs -= [ "//build/config/compiler:chromium_code" ] 312 configs -= [ "//build/config/compiler:chromium_code" ]
279 configs += [ "//build/config/compiler:no_chromium_code" ] 313 configs += [ "//build/config/compiler:no_chromium_code" ]
280 deps = [ 314 deps = [
281 ":libsrtp", 315 ":libsrtp",
282 ] 316 ]
283 sources = [ 317 sources = [
284 "srtp/crypto/test/kernel_driver.c", 318 "srtp/crypto/test/kernel_driver.c",
319 "srtp/include/getopt_s.h",
320 "srtp/test/getopt_s.c",
285 ] 321 ]
286 } 322 }
287 323
288 executable("srtp_test_aes_calc") { 324 executable("srtp_test_aes_calc") {
289 configs -= [ "//build/config/compiler:chromium_code" ] 325 configs -= [ "//build/config/compiler:chromium_code" ]
290 configs += [ "//build/config/compiler:no_chromium_code" ] 326 configs += [ "//build/config/compiler:no_chromium_code" ]
291 deps = [ 327 deps = [
292 ":libsrtp", 328 ":libsrtp",
293 ] 329 ]
294 sources = [ 330 sources = [
295 "srtp/crypto/test/aes_calc.c", 331 "srtp/crypto/test/aes_calc.c",
296 ] 332 ]
297 } 333 }
298 334
299 executable("srtp_test_rand_gen") { 335 executable("srtp_test_rand_gen") {
300 configs -= [ "//build/config/compiler:chromium_code" ] 336 configs -= [ "//build/config/compiler:chromium_code" ]
301 configs += [ "//build/config/compiler:no_chromium_code" ] 337 configs += [ "//build/config/compiler:no_chromium_code" ]
302 deps = [ 338 deps = [
303 ":libsrtp", 339 ":libsrtp",
304 ] 340 ]
305 sources = [ 341 sources = [
306 "srtp/crypto/test/rand_gen.c", 342 "srtp/crypto/test/rand_gen.c",
343 "srtp/include/getopt_s.h",
344 "srtp/test/getopt_s.c",
307 ] 345 ]
308 } 346 }
309 347
348 executable("srtp_test_rand_gen_soak") {
349 configs -= [ "//build/config/compiler:chromium_code" ]
350 configs += [ "//build/config/compiler:no_chromium_code" ]
351 deps = [
352 ":libsrtp",
353 ]
354 sources = [
355 "srtp/crypto/test/rand_gen_soak.c",
356 "srtp/include/getopt_s.h",
357 "srtp/test/getopt_s.c",
358 ]
359 }
360
310 executable("srtp_test_env") { 361 executable("srtp_test_env") {
311 configs -= [ "//build/config/compiler:chromium_code" ] 362 configs -= [ "//build/config/compiler:chromium_code" ]
312 configs += [ "//build/config/compiler:no_chromium_code" ] 363 configs += [ "//build/config/compiler:no_chromium_code" ]
313 deps = [ 364 deps = [
314 ":libsrtp", 365 ":libsrtp",
315 ] 366 ]
316 sources = [ 367 sources = [
317 "srtp/crypto/test/env.c", 368 "srtp/crypto/test/env.c",
318 ] 369 ]
319 } 370 }
320 371
321 group("srtp_runtest") { 372 group("srtp_runtest") {
322 deps = [ 373 deps = [
323 ":rdbx_driver", 374 ":rdbx_driver",
324 ":srtp_driver", 375 ":srtp_driver",
325 ":roc_driver", 376 ":roc_driver",
326 ":replay_driver", 377 ":replay_driver",
327 ":rtpw", 378 ":rtpw",
328 ":srtp_test_cipher_driver", 379 ":srtp_test_cipher_driver",
329 ":srtp_test_datatypes_driver", 380 ":srtp_test_datatypes_driver",
330 ":srtp_test_stat_driver", 381 ":srtp_test_stat_driver",
331 ":srtp_test_sha1_driver", 382 ":srtp_test_sha1_driver",
332 ":srtp_test_kernel_driver", 383 ":srtp_test_kernel_driver",
333 ":srtp_test_aes_calc", 384 ":srtp_test_aes_calc",
334 ":srtp_test_rand_gen", 385 ":srtp_test_rand_gen",
386 ":srtp_test_rand_gen_soak",
335 ":srtp_test_env", 387 ":srtp_test_env",
336 ] 388 ]
337 } 389 }
338 } 390 }
339 } 391 }
OLDNEW
« no previous file with comments | « build/secondary/third_party/freetype/BUILD.gn ('k') | build/secondary/tools/grit/grit_rule.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698