Chromium Code Reviews| Index: net/third_party/nss/ssl/BUILD.gn |
| diff --git a/net/third_party/nss/ssl/BUILD.gn b/net/third_party/nss/ssl/BUILD.gn |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..fef95165836fe81d979b799cf6f55941e108449c |
| --- /dev/null |
| +++ b/net/third_party/nss/ssl/BUILD.gn |
| @@ -0,0 +1,147 @@ |
| +# Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
| +if (is_linux) { |
| + import("//build/config/linux/pkg_config.gni") |
| + |
| + pkg_config("ssl_pkg_config") { |
| + packages = [ "nss" ] |
| + extra_args = [ "-v", "-lssl3" ] |
| + } |
| +} |
| + |
| +config("ssl_config") { |
| + include_dirs = [ "." ] |
| + |
| + if (is_mac || is_win) { |
| + defines = [ "NSS_PLATFORM_CLIENT_AUTH" ] |
| + } |
| +} |
| + |
| +component("libssl") { |
| + output_name = "crssl" |
| + |
| + sources = [ |
| + "authcert.c", |
| + "cmpcert.c", |
| + "derive.c", |
| + "dtlscon.c", |
| + "os2_err.c", |
| + "os2_err.h", |
| + "preenc.h", |
| + "prelib.c", |
| + "ssl.h", |
| + "ssl3con.c", |
| + "ssl3ecc.c", |
| + "ssl3ext.c", |
| + "ssl3gthr.c", |
| + "ssl3prot.h", |
| + "sslauth.c", |
| + "sslcon.c", |
| + "ssldef.c", |
| + "sslenum.c", |
| + "sslerr.c", |
| + "sslerr.h", |
| + "SSLerrs.h", |
| + "sslerrstrs.c", |
| + "sslgathr.c", |
| + "sslimpl.h", |
| + "sslinfo.c", |
| + "sslinit.c", |
| + "sslmutex.c", |
| + "sslmutex.h", |
| + "sslnonce.c", |
| + "sslplatf.c", |
| + "sslproto.h", |
| + "sslreveal.c", |
| + "sslsecur.c", |
| + "sslsnce.c", |
| + "sslsock.c", |
| + "sslt.h", |
| + "ssltrace.c", |
| + "sslver.c", |
| + "unix_err.c", |
| + "unix_err.h", |
| + "win32err.c", |
| + "win32err.h", |
| + "bodge/secitem_array.c", |
| + ] |
| + |
| + direct_dependent_settings = [ ":ssl_config" ] |
| + |
| + cflags = [] |
| + defines = [ |
| + "NO_PKCS11_BYPASS", |
| + "NSS_ENABLE_ECC", |
| + "USE_UTIL_DIRECTLY", |
| + ] |
| + |
| + configs -= [ "//build/config/compiler:chromium_code" ] |
| + configs += [ "//build/config/compiler:no_chromium_code" ] |
| + |
| + if (is_win) { |
| + cflags += [ "/wd4267" ] # Disable warning: Conversion from size_t to 'type'. |
| + |
| + sources -= [ |
| + "unix_err.c", |
| + "unix_err.h", |
| + ] |
| + sources += [ "exports_win.def" ] |
| + } else if (is_linux) { |
| + #visibility hidden thing. |
| + libs = [ "dl" ] |
| + |
| + include_dirs = [ "bodge" ] |
| + |
| + direct_dependent_configs = [ ":ssl_pkg_config" ] |
| + } else if (is_mac) { |
| + libs = [ "Security.framework" ] |
| + } |
| + |
| + if (is_posix) { |
| + sources -= [ |
| + "win32err.c", |
| + "win32err.h", |
| + ] |
| + } |
| + |
| + if (is_mac || is_ios) { |
| + defines += [ |
| + "XP_UNIX", |
| + "DARWIN", |
| + "XP_MACOSX", |
| + ] |
| + } |
| + |
| + if (is_mac || is_ios || is_win) { |
| + sources -= [ |
| + "bodge/secitem_array.c", |
| + ] |
| + deps = [ |
| + #"//third_party/nss:nspr", |
| + #"//third_party/nss:nss", |
|
Ryan Sleevi
2014/04/14 18:38:42
?
|
| + ] |
| + forward_dependent_configs_from = deps |
| + } |
| + |
| + if (component_mode == "shared_library") { |
| + #GCC_SYMBOLS_PRIVATE_EXTERN thing fix me |
| + } |
| + |
| + if (is_clang) { |
| + cflags += [ |
| + # See http://crbug.com/138571#c8. In short, sslsecur.c picks up the |
| + # system's cert.h because cert.h isn't in chromium's repo. |
| + "-Wno-incompatible-pointer-types", |
| + |
| + # There is a broken header guard in /usr/include/nss/secmod.h: |
| + # https://bugzilla.mozilla.org/show_bug.cgi?id=884072 |
| + "-Wno-header-guard", |
| + ] |
| + } |
| + |
| + if (is_debug) { |
| + defines += [ "DEBUG" ] |
| + } |
| +} |