Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(442)

Unified Diff: net/third_party/nss/ssl/BUILD.gn

Issue 1585463002: Use sysroot for chromeos builds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/timers/alarm_timer_unittest.cc ('k') | ui/ozone/platform/drm/gpu/drm_device.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
index 1e43806bd06a423cc374812e5347a33d7569a202..003e2977ed233c7433e15904bc06e3d34296d485 100644
--- a/net/third_party/nss/ssl/BUILD.gn
+++ b/net/third_party/nss/ssl/BUILD.gn
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//build/config/crypto.gni")
+
config("ssl_config") {
include_dirs = [ "." ]
@@ -10,128 +12,130 @@ config("ssl_config") {
}
}
-component("libssl") {
- output_name = "crssl"
-
- sources = [
- "SSLerrs.h",
- "authcert.c",
- "bodge/secitem_array.c",
- "cmpcert.c",
- "derive.c",
- "dtlscon.c",
- "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",
- "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",
- ]
-
- public_configs = [ ":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) {
- sources -= [
+if (!use_openssl) {
+ component("libssl") {
+ output_name = "crssl"
+
+ sources = [
+ "SSLerrs.h",
+ "authcert.c",
+ "bodge/secitem_array.c",
+ "cmpcert.c",
+ "derive.c",
+ "dtlscon.c",
+ "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",
+ "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",
]
- if (is_component_build) {
- ldflags = [ "/DEF:" + rebase_path("exports_win.def", root_build_dir) ]
- }
- } else if (is_linux) {
- if (is_component_build) {
- configs -= [ "//build/config/gcc:symbol_visibility_hidden" ]
- }
- libs = [ "dl" ]
+ public_configs = [ ":ssl_config" ]
- include_dirs = [ "bodge" ]
+ cflags = []
+ defines = [
+ "NO_PKCS11_BYPASS",
+ "NSS_ENABLE_ECC",
+ "USE_UTIL_DIRECTLY",
+ ]
- # Must be after ssl_config since we want our SSL headers to take
- # precedence.
- public_configs += [ "//third_party/nss:system_nss_no_ssl_config" ]
- } else if (is_mac) {
- libs = [ "Security.framework" ]
- }
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+
+ if (is_win) {
+ sources -= [
+ "unix_err.c",
+ "unix_err.h",
+ ]
+ if (is_component_build) {
+ ldflags = [ "/DEF:" + rebase_path("exports_win.def", root_build_dir) ]
+ }
+ } else if (is_linux) {
+ if (is_component_build) {
+ configs -= [ "//build/config/gcc:symbol_visibility_hidden" ]
+ }
+
+ libs = [ "dl" ]
+
+ include_dirs = [ "bodge" ]
+
+ # Must be after ssl_config since we want our SSL headers to take
+ # precedence.
+ public_configs += [ "//third_party/nss:system_nss_no_ssl_config" ]
+ } else if (is_mac) {
+ libs = [ "Security.framework" ]
+ }
- if (is_clang) {
- # SSL triggers some of these Clang warnings.
- configs -= [ "//build/config/clang:extra_warnings" ]
+ if (is_clang) {
+ # SSL triggers some of these Clang warnings.
+ configs -= [ "//build/config/clang:extra_warnings" ]
- # There is a broken header guard in /usr/include/nss/secmod.h:
- # https://bugzilla.mozilla.org/show_bug.cgi?id=884072
- cflags = [ "-Wno-header-guard" ]
+ # There is a broken header guard in /usr/include/nss/secmod.h:
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=884072
+ cflags = [ "-Wno-header-guard" ]
- if (is_ios) {
- # libssl uses routines deprecated on iOS (sem_init/sem_destroy).
- # https://bugzilla.mozilla.org/show_bug.cgi?id=1192500
- cflags += [ "-Wno-deprecated-declarations" ]
+ if (is_ios) {
+ # libssl uses routines deprecated on iOS (sem_init/sem_destroy).
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=1192500
+ cflags += [ "-Wno-deprecated-declarations" ]
+ }
}
- }
- if (is_posix) {
- sources -= [
- "win32err.c",
- "win32err.h",
- ]
- }
+ if (is_posix) {
+ sources -= [
+ "win32err.c",
+ "win32err.h",
+ ]
+ }
- if (is_mac || is_ios) {
- defines += [
- "XP_UNIX",
- "DARWIN",
- "XP_MACOSX",
- ]
- }
+ if (is_mac || is_ios) {
+ defines += [
+ "XP_UNIX",
+ "DARWIN",
+ "XP_MACOSX",
+ ]
+ }
- if (is_mac || is_ios || is_win) {
- sources -= [ "bodge/secitem_array.c" ]
- public_deps = [
- "//third_party/nss:nspr",
- "//third_party/nss:nss",
- ]
- }
+ if (is_mac || is_ios || is_win) {
+ sources -= [ "bodge/secitem_array.c" ]
+ public_deps = [
+ "//third_party/nss:nspr",
+ "//third_party/nss:nss",
+ ]
+ }
- if (is_debug) {
- defines += [ "DEBUG" ]
+ if (is_debug) {
+ defines += [ "DEBUG" ]
+ }
}
}
« no previous file with comments | « components/timers/alarm_timer_unittest.cc ('k') | ui/ozone/platform/drm/gpu/drm_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698