Chromium Code Reviews| Index: build/secondary/third_party/libsrtp/BUILD.gn |
| diff --git a/build/secondary/third_party/libsrtp/BUILD.gn b/build/secondary/third_party/libsrtp/BUILD.gn |
| index 8b9647c142e6df2462a544707ae617e94cfd9344..76f47246bcfc61bfc232e75566424caebc2babc4 100644 |
| --- a/build/secondary/third_party/libsrtp/BUILD.gn |
| +++ b/build/secondary/third_party/libsrtp/BUILD.gn |
| @@ -4,12 +4,15 @@ |
| declare_args() { |
| use_system_libsrtp = false |
| + use_srtp_openssl = true |
|
Nico
2015/03/26 23:59:16
Does anything ever set this to false? Should it be
|
| } |
| config("libsrtp_config") { |
| defines = [ |
| + "HAVE_CONFIG_H", |
| "HAVE_STDLIB_H", |
| "HAVE_STRING_H", |
| + "TESTAPP_SOURCE", |
| ] |
| include_dirs = [ |
| @@ -18,6 +21,10 @@ config("libsrtp_config") { |
| "srtp/crypto/include", |
| ] |
| + if (use_srtp_openssl) { |
| + defines += [ "OPENSSL" ] |
| + } |
| + |
| if (is_posix) { |
| defines += [ |
| "HAVE_INT16_T", |
| @@ -30,13 +37,14 @@ config("libsrtp_config") { |
| "HAVE_STDINT_H", |
| "HAVE_INTTYPES_H", |
| "HAVE_NETINET_IN_H", |
| - "INLINE=inline", |
| + "HAVE_ARPA_INET_H", |
| + "HAVE_UNISTD_H", |
| ] |
| + cflags = [ "-Wno-unused-variable" ] |
| } |
| if (is_win) { |
| defines += [ |
| - "INLINE=__inline", |
| "HAVE_BYTESWAP_METHODS_H", |
| # All Windows architectures are this way. |
| @@ -149,6 +157,29 @@ if (use_system_libsrtp) { |
| if (is_clang) { |
| cflags = [ "-Wno-implicit-function-declaration" ] |
| } |
| + |
| + if (use_srtp_openssl) { |
| + deps = [ |
| + "//third_party/boringssl:boringssl", |
| + ] |
| + sources -= [ |
| + "srtp/crypto/cipher/aes_cbc.c", |
| + "srtp/crypto/cipher/aes_icm.c", |
| + "srtp/crypto/hash/hmac.c", |
| + "srtp/crypto/hash/sha1.c", |
| + "srtp/crypto/rng/ctr_prng.c", |
| + "srtp/crypto/rng/prng.c", |
| + "srtp/crypto/rng/rand_source.c", |
| + ] |
| + sources += [ |
| + "srtp/crypto/cipher/aes_gcm_ossl.c", |
| + "srtp/crypto/cipher/aes_icm_ossl.c", |
| + "srtp/crypto/hash/hmac_ossl.c", |
| + "srtp/crypto/include/aes_gcm_ossl.h", |
| + "srtp/crypto/include/aes_icm_ossl.h", |
| + "srtp/crypto/rng/rand_source_ossl.c", |
| + ] |
| + } |
| } |
| # TODO(GYP): A bunch of these tests don't compile (in gyp either). They're |
| @@ -236,6 +267,9 @@ if (use_system_libsrtp) { |
| deps = [ |
| ":libsrtp", |
| ] |
| + if (use_srtp_openssl) { |
| + deps += [ "//third_party/boringssl:boringssl" ] |
| + } |
| sources = [ |
| "srtp/crypto/test/cipher_driver.c", |
| ] |
| @@ -307,6 +341,17 @@ if (use_system_libsrtp) { |
| ] |
| } |
| + executable("srtp_test_rand_gen_soak") { |
| + configs -= [ "//build/config/compiler:chromium_code" ] |
| + configs += [ "//build/config/compiler:no_chromium_code" ] |
| + deps = [ |
| + ":libsrtp", |
| + ] |
| + sources = [ |
| + "srtp/crypto/test/rand_gen_soak.c", |
| + ] |
| + } |
| + |
| executable("srtp_test_env") { |
| configs -= [ "//build/config/compiler:chromium_code" ] |
| configs += [ "//build/config/compiler:no_chromium_code" ] |
| @@ -332,6 +377,7 @@ if (use_system_libsrtp) { |
| ":srtp_test_kernel_driver", |
| ":srtp_test_aes_calc", |
| ":srtp_test_rand_gen", |
| + ":srtp_test_rand_gen_soak", |
| ":srtp_test_env", |
| ] |
| } |