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 if (is_linux) { |
| 6 import("//build/config/linux/pkg_config.gni") |
| 7 |
| 8 pkg_config("ssl_pkg_config") { |
| 9 packages = [ "nss" ] |
| 10 extra_args = [ "-v", "-lssl3" ] |
| 11 } |
| 12 } |
| 13 |
| 14 config("ssl_config") { |
| 15 include_dirs = [ "." ] |
| 16 |
| 17 if (is_mac || is_win) { |
| 18 defines = [ "NSS_PLATFORM_CLIENT_AUTH" ] |
| 19 } |
| 20 } |
| 21 |
| 22 component("libssl") { |
| 23 output_name = "crssl" |
| 24 |
| 25 sources = [ |
| 26 "authcert.c", |
| 27 "cmpcert.c", |
| 28 "derive.c", |
| 29 "dtlscon.c", |
| 30 "os2_err.c", |
| 31 "os2_err.h", |
| 32 "preenc.h", |
| 33 "prelib.c", |
| 34 "ssl.h", |
| 35 "ssl3con.c", |
| 36 "ssl3ecc.c", |
| 37 "ssl3ext.c", |
| 38 "ssl3gthr.c", |
| 39 "ssl3prot.h", |
| 40 "sslauth.c", |
| 41 "sslcon.c", |
| 42 "ssldef.c", |
| 43 "sslenum.c", |
| 44 "sslerr.c", |
| 45 "sslerr.h", |
| 46 "SSLerrs.h", |
| 47 "sslerrstrs.c", |
| 48 "sslgathr.c", |
| 49 "sslimpl.h", |
| 50 "sslinfo.c", |
| 51 "sslinit.c", |
| 52 "sslmutex.c", |
| 53 "sslmutex.h", |
| 54 "sslnonce.c", |
| 55 "sslplatf.c", |
| 56 "sslproto.h", |
| 57 "sslreveal.c", |
| 58 "sslsecur.c", |
| 59 "sslsnce.c", |
| 60 "sslsock.c", |
| 61 "sslt.h", |
| 62 "ssltrace.c", |
| 63 "sslver.c", |
| 64 "unix_err.c", |
| 65 "unix_err.h", |
| 66 "win32err.c", |
| 67 "win32err.h", |
| 68 "bodge/secitem_array.c", |
| 69 ] |
| 70 |
| 71 direct_dependent_settings = [ ":ssl_config" ] |
| 72 |
| 73 cflags = [] |
| 74 defines = [ |
| 75 "NO_PKCS11_BYPASS", |
| 76 "NSS_ENABLE_ECC", |
| 77 "USE_UTIL_DIRECTLY", |
| 78 ] |
| 79 |
| 80 configs -= [ "//build/config/compiler:chromium_code" ] |
| 81 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 82 |
| 83 if (is_win) { |
| 84 cflags += [ "/wd4267" ] # Disable warning: Conversion from size_t to 'type'
. |
| 85 |
| 86 sources -= [ |
| 87 "unix_err.c", |
| 88 "unix_err.h", |
| 89 ] |
| 90 sources += [ "exports_win.def" ] |
| 91 } else if (is_linux) { |
| 92 #visibility hidden thing. |
| 93 libs = [ "dl" ] |
| 94 |
| 95 include_dirs = [ "bodge" ] |
| 96 |
| 97 direct_dependent_configs = [ ":ssl_pkg_config" ] |
| 98 } else if (is_mac) { |
| 99 libs = [ "Security.framework" ] |
| 100 } |
| 101 |
| 102 if (is_posix) { |
| 103 sources -= [ |
| 104 "win32err.c", |
| 105 "win32err.h", |
| 106 ] |
| 107 } |
| 108 |
| 109 if (is_mac || is_ios) { |
| 110 defines += [ |
| 111 "XP_UNIX", |
| 112 "DARWIN", |
| 113 "XP_MACOSX", |
| 114 ] |
| 115 } |
| 116 |
| 117 if (is_mac || is_ios || is_win) { |
| 118 sources -= [ |
| 119 "bodge/secitem_array.c", |
| 120 ] |
| 121 deps = [ |
| 122 #"//third_party/nss:nspr", |
| 123 #"//third_party/nss:nss", |
| 124 ] |
| 125 forward_dependent_configs_from = deps |
| 126 } |
| 127 |
| 128 if (component_mode == "shared_library") { |
| 129 #GCC_SYMBOLS_PRIVATE_EXTERN thing fix me |
| 130 } |
| 131 |
| 132 if (is_clang) { |
| 133 cflags += [ |
| 134 # See http://crbug.com/138571#c8. In short, sslsecur.c picks up the |
| 135 # system's cert.h because cert.h isn't in chromium's repo. |
| 136 "-Wno-incompatible-pointer-types", |
| 137 |
| 138 # There is a broken header guard in /usr/include/nss/secmod.h: |
| 139 # https://bugzilla.mozilla.org/show_bug.cgi?id=884072 |
| 140 "-Wno-header-guard", |
| 141 ] |
| 142 } |
| 143 |
| 144 if (is_debug) { |
| 145 defines += [ "DEBUG" ] |
| 146 } |
| 147 } |
OLD | NEW |