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

Side by Side Diff: build/secondary/third_party/nss/BUILD.gn

Issue 951673002: Revert "Pull chromium at 2c3ffb2355a27c32f45e508ef861416b820c823b" (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « build/secondary/third_party/libsrtp/BUILD.gn ('k') | build/toolchain/android/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/linux/pkg_config.gni") 5 import("//build/config/linux/pkg_config.gni")
6 6
7 if (is_linux) { 7 if (is_linux) {
8 # This is a dependency on NSS with no libssl. On Linux we use a built-in SSL 8 # This is a dependency on NSS with no libssl. On Linux we use a built-in SSL
9 # library but the system NSS libraries. Non-Linux platforms using NSS use the 9 # library but the system NSS libraries. Non-Linux platforms using NSS use the
10 # hermetic one in //third_party/nss. 10 # hermetic one in //third_party/nss.
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 210
211 public_configs = [ ":nspr_config" ] 211 public_configs = [ ":nspr_config" ]
212 212
213 configs -= [ "//build/config/compiler:chromium_code" ] 213 configs -= [ "//build/config/compiler:chromium_code" ]
214 if (is_win) { 214 if (is_win) {
215 configs -= [ 215 configs -= [
216 "//build/config/win:unicode", # Requires 8-bit mode. 216 "//build/config/win:unicode", # Requires 8-bit mode.
217 "//build/config/win:lean_and_mean", # Won"t compile with lean and mean. 217 "//build/config/win:lean_and_mean", # Won"t compile with lean and mean.
218 ] 218 ]
219 } 219 }
220 configs += [ 220 configs += [ "//build/config/compiler:no_chromium_code" ]
221 "//build/config/compiler:no_chromium_code",
222 "//build/config/compiler:no_size_t_to_int_warning",
223 ]
224 221
225 cflags = [] 222 cflags = []
226 defines = [ 223 defines = [
227 "_NSPR_BUILD_", 224 "_NSPR_BUILD_",
228 "FORCE_PR_LOG", 225 "FORCE_PR_LOG",
229 ] 226 ]
230 227
231 include_dirs = [ "nspr/pr/include/private" ] 228 include_dirs = [ "nspr/pr/include/private" ]
232 229
233 if (is_win) { 230 if (is_win) {
234 cflags = [ "/wd4554" ] # Check precidence. 231 cflags = [
232 "/wd4554", # Check precidence.
233 "/wd4267", # Conversion from size_t to "type".
234 ]
235 defines += [ 235 defines += [
236 "XP_PC", 236 "XP_PC",
237 "WIN32", 237 "WIN32",
238 "WIN95", 238 "WIN95",
239 "_PR_GLOBAL_THREADS_ONLY", 239 "_PR_GLOBAL_THREADS_ONLY",
240 "_CRT_SECURE_NO_WARNINGS", 240 "_CRT_SECURE_NO_WARNINGS",
241 ] 241 ]
242 } else { 242 } else {
243 sources -= [ 243 sources -= [
244 "nspr/pr/src/md/windows/ntgc.c", 244 "nspr/pr/src/md/windows/ntgc.c",
(...skipping 29 matching lines...) Expand all
274 "nspr/pr/src/md/unix/uxrng.c", 274 "nspr/pr/src/md/unix/uxrng.c",
275 "nspr/pr/src/md/unix/uxshm.c", 275 "nspr/pr/src/md/unix/uxshm.c",
276 "nspr/pr/src/md/unix/uxwrap.c", 276 "nspr/pr/src/md/unix/uxwrap.c",
277 "nspr/pr/src/pthreads/ptio.c", 277 "nspr/pr/src/pthreads/ptio.c",
278 "nspr/pr/src/pthreads/ptmisc.c", 278 "nspr/pr/src/pthreads/ptmisc.c",
279 "nspr/pr/src/pthreads/ptsynch.c", 279 "nspr/pr/src/pthreads/ptsynch.c",
280 "nspr/pr/src/pthreads/ptthread.c", 280 "nspr/pr/src/pthreads/ptthread.c",
281 ] 281 ]
282 } 282 }
283 283
284 if (current_cpu == "x86") { 284 if (cpu_arch == "x86") {
285 defines += [ "_X86_" ] 285 defines += [ "_X86_" ]
286 } else if (current_cpu == "x64") { 286 } else if (cpu_arch == "x64") {
287 defines += [ "_AMD64_" ] 287 defines += [ "_AMD64_" ]
288 } 288 }
289 289
290 if (is_mac || is_ios) { 290 if (is_mac || is_ios) {
291 sources -= [ 291 sources -= [
292 "nspr/pr/src/io/prdir.c", 292 "nspr/pr/src/io/prdir.c",
293 "nspr/pr/src/io/prfile.c", 293 "nspr/pr/src/io/prfile.c",
294 "nspr/pr/src/io/prio.c", 294 "nspr/pr/src/io/prio.c",
295 "nspr/pr/src/io/prsocket.c", 295 "nspr/pr/src/io/prsocket.c",
296 "nspr/pr/src/misc/pripcsem.c", 296 "nspr/pr/src/misc/pripcsem.c",
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 "nss/lib/nss", 467 "nss/lib/nss",
468 "nss/lib/pk11wrap", 468 "nss/lib/pk11wrap",
469 "nss/lib/pkcs7", 469 "nss/lib/pkcs7",
470 "nss/lib/pki", 470 "nss/lib/pki",
471 "nss/lib/smime", 471 "nss/lib/smime",
472 "nss/lib/softoken", 472 "nss/lib/softoken",
473 "nss/lib/util", 473 "nss/lib/util",
474 ] 474 ]
475 } 475 }
476 476
477 if (is_win && current_cpu == "x86") { 477 if (is_win && cpu_arch == "x86") {
478 source_set("nss_static_avx") { 478 source_set("nss_static_avx") {
479 sources = [ 479 sources = [
480 "nss/lib/freebl/intel-gcm-wrap.c", 480 "nss/lib/freebl/intel-gcm-wrap.c",
481 "nss/lib/freebl/intel-gcm-x86-masm.asm", 481 "nss/lib/freebl/intel-gcm-x86-masm.asm",
482 "nss/lib/freebl/intel-gcm.h", 482 "nss/lib/freebl/intel-gcm.h",
483 ] 483 ]
484 defines = [ 484 defines = [
485 "_WINDOWS", 485 "_WINDOWS",
486 "_X86_", 486 "_X86_",
487 "INTEL_GCM", 487 "INTEL_GCM",
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 "nss/lib/freebl/win_rand.c", 875 "nss/lib/freebl/win_rand.c",
876 876
877 # debug_module.c is included by pk11load.c. 877 # debug_module.c is included by pk11load.c.
878 "nss/lib/pk11wrap/debug_module.c", 878 "nss/lib/pk11wrap/debug_module.c",
879 ] 879 ]
880 880
881 configs -= [ "//build/config/compiler:chromium_code" ] 881 configs -= [ "//build/config/compiler:chromium_code" ]
882 if (is_win) { 882 if (is_win) {
883 configs -= [ "//build/config/win:unicode" ] # Requires 8-bit mode. 883 configs -= [ "//build/config/win:unicode" ] # Requires 8-bit mode.
884 } 884 }
885 configs += [ 885 configs += [ "//build/config/compiler:no_chromium_code" ]
886 "//build/config/compiler:no_chromium_code",
887 "//build/config/compiler:no_size_t_to_int_warning",
888 ]
889 public_configs = [ ":nss_static_config" ] 886 public_configs = [ ":nss_static_config" ]
890 887
891 cflags = [] 888 cflags = []
892 889
893 # Only need the defines and includes not in nss_static_config. 890 # Only need the defines and includes not in nss_static_config.
894 defines = [ 891 defines = [
895 "MP_API_COMPATIBLE", 892 "MP_API_COMPATIBLE",
896 "NSS_DISABLE_DBM", 893 "NSS_DISABLE_DBM",
897 "RIJNDAEL_INCLUDE_TABLES", 894 "RIJNDAEL_INCLUDE_TABLES",
898 "SHLIB_VERSION=\"3\"", 895 "SHLIB_VERSION=\"3\"",
899 "SOFTOKEN_SHLIB_VERSION=\"3\"", 896 "SOFTOKEN_SHLIB_VERSION=\"3\"",
900 ] 897 ]
901 include_dirs = [ 898 include_dirs = [
902 "nss/lib/freebl/mpi", 899 "nss/lib/freebl/mpi",
903 "nss/lib/ssl", 900 "nss/lib/ssl",
904 ] 901 ]
905 902
906 if (is_win) { 903 if (is_win) {
907 cflags += [ "/wd4101" ] # Unreferenced local variable. 904 cflags += [
905 "/wd4101", # Unreferenced local variable.
906 "/wd4267", # Conversion from size_t to "type".
907 ]
908 } 908 }
909 909
910 if (include_nss_libpkix) { 910 if (include_nss_libpkix) {
911 sources += [ 911 sources += [
912 "nss/lib/certhigh/certvfypkix.c", 912 "nss/lib/certhigh/certvfypkix.c",
913 "nss/lib/certhigh/certvfypkixprint.c", 913 "nss/lib/certhigh/certvfypkixprint.c",
914 "nss/lib/libpkix/include/pkix.h", 914 "nss/lib/libpkix/include/pkix.h",
915 "nss/lib/libpkix/include/pkix_certsel.h", 915 "nss/lib/libpkix/include/pkix_certsel.h",
916 "nss/lib/libpkix/include/pkix_certstore.h", 916 "nss/lib/libpkix/include/pkix_certstore.h",
917 "nss/lib/libpkix/include/pkix_checker.h", 917 "nss/lib/libpkix/include/pkix_checker.h",
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
1087 "nss/lib/libpkix/pkix_pl_nss/system", 1087 "nss/lib/libpkix/pkix_pl_nss/system",
1088 ] 1088 ]
1089 } else { 1089 } else {
1090 defines += [ "NSS_DISABLE_LIBPKIX" ] 1090 defines += [ "NSS_DISABLE_LIBPKIX" ]
1091 } 1091 }
1092 1092
1093 if (!include_nss_root_certs) { 1093 if (!include_nss_root_certs) {
1094 defines += [ "NSS_DISABLE_ROOT_CERTS" ] 1094 defines += [ "NSS_DISABLE_ROOT_CERTS" ]
1095 } 1095 }
1096 1096
1097 if (current_cpu == "x64" && !is_win) { 1097 if (cpu_arch == "x64" && !is_win) {
1098 sources -= [ 1098 sources -= [
1099 "nss/lib/freebl/chacha20/chacha20.c", 1099 "nss/lib/freebl/chacha20/chacha20.c",
1100 "nss/lib/freebl/poly1305/poly1305.c", 1100 "nss/lib/freebl/poly1305/poly1305.c",
1101 ] 1101 ]
1102 } else { 1102 } else {
1103 sources -= [ 1103 sources -= [
1104 "nss/lib/freebl/chacha20/chacha20_vec.c", 1104 "nss/lib/freebl/chacha20/chacha20_vec.c",
1105 "nss/lib/freebl/poly1305/poly1305-donna-x64-sse2-incremental-source.c", 1105 "nss/lib/freebl/poly1305/poly1305-donna-x64-sse2-incremental-source.c",
1106 ] 1106 ]
1107 } 1107 }
(...skipping 24 matching lines...) Expand all
1132 if (is_win) { 1132 if (is_win) {
1133 defines += [ 1133 defines += [
1134 "SHLIB_SUFFIX=\"dll\"", 1134 "SHLIB_SUFFIX=\"dll\"",
1135 "SHLIB_PREFIX=\"\"", 1135 "SHLIB_PREFIX=\"\"",
1136 "SOFTOKEN_LIB_NAME=\"softokn3.dll\"", 1136 "SOFTOKEN_LIB_NAME=\"softokn3.dll\"",
1137 "XP_PC", 1137 "XP_PC",
1138 "WIN32", 1138 "WIN32",
1139 "WIN95", 1139 "WIN95",
1140 ] 1140 ]
1141 1141
1142 if (current_cpu == "x86") { 1142 if (cpu_arch == "x86") {
1143 defines += [ 1143 defines += [
1144 "NSS_X86_OR_X64", 1144 "NSS_X86_OR_X64",
1145 "NSS_X86", 1145 "NSS_X86",
1146 "_X86_", 1146 "_X86_",
1147 "MP_ASSEMBLY_MULTIPLY", 1147 "MP_ASSEMBLY_MULTIPLY",
1148 "MP_ASSEMBLY_SQUARE", 1148 "MP_ASSEMBLY_SQUARE",
1149 "MP_ASSEMBLY_DIV_2DX1D", 1149 "MP_ASSEMBLY_DIV_2DX1D",
1150 "MP_USE_UINT_DIGIT", 1150 "MP_USE_UINT_DIGIT",
1151 "MP_NO_MP_WORD", 1151 "MP_NO_MP_WORD",
1152 "USE_HW_AES", 1152 "USE_HW_AES",
1153 "INTEL_GCM", 1153 "INTEL_GCM",
1154 ] 1154 ]
1155 sources -= [ "nss/lib/freebl/mpi/mpi_amd64.c" ] 1155 sources -= [ "nss/lib/freebl/mpi/mpi_amd64.c" ]
1156 } else if (current_cpu == "x64") { 1156 } else if (cpu_arch == "x64") {
1157 sources -= [ 1157 sources -= [
1158 "nss/lib/freebl/intel-aes-x86-masm.asm", 1158 "nss/lib/freebl/intel-aes-x86-masm.asm",
1159 "nss/lib/freebl/mpi/mpi_amd64.c", 1159 "nss/lib/freebl/mpi/mpi_amd64.c",
1160 "nss/lib/freebl/mpi/mpi_x86_asm.c", 1160 "nss/lib/freebl/mpi/mpi_x86_asm.c",
1161 ] 1161 ]
1162 defines += [ 1162 defines += [
1163 "NSS_USE_64", 1163 "NSS_USE_64",
1164 "NSS_X86_OR_X64", 1164 "NSS_X86_OR_X64",
1165 "NSS_X64", 1165 "NSS_X64",
1166 "_AMD64_", 1166 "_AMD64_",
(...skipping 30 matching lines...) Expand all
1197 } 1197 }
1198 1198
1199 public_deps = [ 1199 public_deps = [
1200 ":nspr", 1200 ":nspr",
1201 ] 1201 ]
1202 deps = [ 1202 deps = [
1203 ":nspr", 1203 ":nspr",
1204 "//third_party/sqlite", 1204 "//third_party/sqlite",
1205 ] 1205 ]
1206 1206
1207 if (is_win && current_cpu == "x86") { 1207 if (is_win && cpu_arch == "x86") {
1208 deps += [ ":nss_static_avx" ] 1208 deps += [ ":nss_static_avx" ]
1209 } 1209 }
1210 } 1210 }
1211 } # Windows/Mac/iOS. 1211 } # Windows/Mac/iOS.
OLDNEW
« no previous file with comments | « build/secondary/third_party/libsrtp/BUILD.gn ('k') | build/toolchain/android/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698