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 "authcert.c", |
| 18 "cmpcert.c", |
| 19 "derive.c", |
| 20 "dtlscon.c", |
| 21 "preenc.h", |
| 22 "prelib.c", |
| 23 "ssl.h", |
| 24 "ssl3con.c", |
| 25 "ssl3ecc.c", |
| 26 "ssl3ext.c", |
| 27 "ssl3gthr.c", |
| 28 "ssl3prot.h", |
| 29 "sslauth.c", |
| 30 "sslcon.c", |
| 31 "ssldef.c", |
| 32 "sslenum.c", |
| 33 "sslerr.c", |
| 34 "sslerr.h", |
| 35 "SSLerrs.h", |
| 36 "sslerrstrs.c", |
| 37 "sslgathr.c", |
| 38 "sslimpl.h", |
| 39 "sslinfo.c", |
| 40 "sslinit.c", |
| 41 "sslmutex.c", |
| 42 "sslmutex.h", |
| 43 "sslnonce.c", |
| 44 "sslplatf.c", |
| 45 "sslproto.h", |
| 46 "sslreveal.c", |
| 47 "sslsecur.c", |
| 48 "sslsnce.c", |
| 49 "sslsock.c", |
| 50 "sslt.h", |
| 51 "ssltrace.c", |
| 52 "sslver.c", |
| 53 "unix_err.c", |
| 54 "unix_err.h", |
| 55 "win32err.c", |
| 56 "win32err.h", |
| 57 "bodge/secitem_array.c", |
| 58 ] |
| 59 |
| 60 direct_dependent_settings = [ ":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 sources += [ "exports_win.def" ] |
| 80 } else if (is_linux) { |
| 81 #visibility hidden thing. |
| 82 libs = [ "dl" ] |
| 83 |
| 84 include_dirs = [ "bodge" ] |
| 85 |
| 86 direct_dependent_configs = [ |
| 87 "//third_party/nss:system_nss_no_ssl_config" |
| 88 ] |
| 89 } else if (is_mac) { |
| 90 libs = [ "Security.framework" ] |
| 91 } |
| 92 |
| 93 if (is_posix) { |
| 94 sources -= [ |
| 95 "win32err.c", |
| 96 "win32err.h", |
| 97 ] |
| 98 } |
| 99 |
| 100 if (is_mac || is_ios) { |
| 101 defines += [ |
| 102 "XP_UNIX", |
| 103 "DARWIN", |
| 104 "XP_MACOSX", |
| 105 ] |
| 106 } |
| 107 |
| 108 if (is_mac || is_ios || is_win) { |
| 109 sources -= [ |
| 110 "bodge/secitem_array.c", |
| 111 ] |
| 112 deps = [ |
| 113 "//third_party/nss:nspr", |
| 114 "//third_party/nss:nss", |
| 115 ] |
| 116 forward_dependent_configs_from = deps |
| 117 } |
| 118 |
| 119 if (component_mode == "shared_library") { |
| 120 # TODO(brettw) GCC_SYMBOLS_PRIVATE_EXTERN thing. |
| 121 } |
| 122 |
| 123 if (is_clang) { |
| 124 cflags += [ |
| 125 # See http://crbug.com/138571#c8. In short, sslsecur.c picks up the |
| 126 # system's cert.h because cert.h isn't in chromium's repo. |
| 127 "-Wno-incompatible-pointer-types", |
| 128 |
| 129 # There is a broken header guard in /usr/include/nss/secmod.h: |
| 130 # https://bugzilla.mozilla.org/show_bug.cgi?id=884072 |
| 131 "-Wno-header-guard", |
| 132 ] |
| 133 } |
| 134 |
| 135 if (is_debug) { |
| 136 defines += [ "DEBUG" ] |
| 137 } |
| 138 } |
OLD | NEW |