| OLD | NEW |
| (Empty) |
| 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 | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 config("ssl_config") { | |
| 6 include_dirs = [ "." ] | |
| 7 | |
| 8 if (is_mac || is_win) { | |
| 9 defines = [ "NSS_PLATFORM_CLIENT_AUTH" ] | |
| 10 } | |
| 11 } | |
| 12 | |
| 13 component("libssl") { | |
| 14 output_name = "crssl" | |
| 15 | |
| 16 sources = [ | |
| 17 "SSLerrs.h", | |
| 18 "authcert.c", | |
| 19 "bodge/secitem_array.c", | |
| 20 "cmpcert.c", | |
| 21 "derive.c", | |
| 22 "dtlscon.c", | |
| 23 "preenc.h", | |
| 24 "prelib.c", | |
| 25 "ssl.h", | |
| 26 "ssl3con.c", | |
| 27 "ssl3ecc.c", | |
| 28 "ssl3ext.c", | |
| 29 "ssl3gthr.c", | |
| 30 "ssl3prot.h", | |
| 31 "sslauth.c", | |
| 32 "sslcon.c", | |
| 33 "ssldef.c", | |
| 34 "sslenum.c", | |
| 35 "sslerr.c", | |
| 36 "sslerr.h", | |
| 37 "sslerrstrs.c", | |
| 38 "sslgathr.c", | |
| 39 "sslimpl.h", | |
| 40 "sslinfo.c", | |
| 41 "sslinit.c", | |
| 42 "sslmutex.c", | |
| 43 "sslmutex.h", | |
| 44 "sslnonce.c", | |
| 45 "sslplatf.c", | |
| 46 "sslproto.h", | |
| 47 "sslreveal.c", | |
| 48 "sslsecur.c", | |
| 49 "sslsnce.c", | |
| 50 "sslsock.c", | |
| 51 "sslt.h", | |
| 52 "ssltrace.c", | |
| 53 "sslver.c", | |
| 54 "unix_err.c", | |
| 55 "unix_err.h", | |
| 56 "win32err.c", | |
| 57 "win32err.h", | |
| 58 ] | |
| 59 | |
| 60 public_configs = [ ":ssl_config" ] | |
| 61 | |
| 62 cflags = [] | |
| 63 defines = [ | |
| 64 "NO_PKCS11_BYPASS", | |
| 65 "NSS_ENABLE_ECC", | |
| 66 "USE_UTIL_DIRECTLY", | |
| 67 ] | |
| 68 | |
| 69 configs -= [ "//build/config/compiler:chromium_code" ] | |
| 70 configs += [ "//build/config/compiler:no_chromium_code" ] | |
| 71 | |
| 72 if (is_win) { | |
| 73 cflags += [ "/wd4267" ] # Disable warning: Conversion from size_t to 'type'
. | |
| 74 | |
| 75 sources -= [ | |
| 76 "unix_err.c", | |
| 77 "unix_err.h", | |
| 78 ] | |
| 79 if (component_mode == "shared_library") { | |
| 80 ldflags = [ "/DEF:" + rebase_path("exports_win.def", root_build_dir) ] | |
| 81 } | |
| 82 } else if (is_linux) { | |
| 83 if (component_mode == "shared_library") { | |
| 84 configs -= [ "//build/config/gcc:symbol_visibility_hidden" ] | |
| 85 } | |
| 86 | |
| 87 libs = [ "dl" ] | |
| 88 | |
| 89 include_dirs = [ "bodge" ] | |
| 90 | |
| 91 # Must be after ssl_config since we want our SSL headers to take | |
| 92 # precedence. | |
| 93 public_configs += [ "//third_party/nss:system_nss_no_ssl_config" ] | |
| 94 } else if (is_mac) { | |
| 95 libs = [ "Security.framework" ] | |
| 96 } | |
| 97 | |
| 98 if (is_clang) { | |
| 99 # SSL triggers some of these Clang warnings. | |
| 100 configs -= [ "//build/config/clang:extra_warnings" ] | |
| 101 } | |
| 102 | |
| 103 if (is_posix) { | |
| 104 sources -= [ | |
| 105 "win32err.c", | |
| 106 "win32err.h", | |
| 107 ] | |
| 108 } | |
| 109 | |
| 110 if (is_mac || is_ios) { | |
| 111 defines += [ | |
| 112 "XP_UNIX", | |
| 113 "DARWIN", | |
| 114 "XP_MACOSX", | |
| 115 ] | |
| 116 } | |
| 117 | |
| 118 if (is_mac || is_ios || is_win) { | |
| 119 sources -= [ "bodge/secitem_array.c" ] | |
| 120 public_deps = [ | |
| 121 "//third_party/nss:nspr", | |
| 122 "//third_party/nss:nss", | |
| 123 ] | |
| 124 } | |
| 125 | |
| 126 if (is_debug) { | |
| 127 defines += [ "DEBUG" ] | |
| 128 } | |
| 129 } | |
| OLD | NEW |