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

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

Issue 913373002: Update Chomium's build files to work w/ latest GN binaries. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn_cpu_arch_changes
Patch Set: merge to #317214 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
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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 224
225 cflags = [] 225 cflags = []
226 defines = [ 226 defines = [
227 "_NSPR_BUILD_", 227 "_NSPR_BUILD_",
228 "FORCE_PR_LOG", 228 "FORCE_PR_LOG",
229 ] 229 ]
230 230
231 include_dirs = [ "nspr/pr/include/private" ] 231 include_dirs = [ "nspr/pr/include/private" ]
232 232
233 if (is_win) { 233 if (is_win) {
234 cflags = [ 234 cflags = [ "/wd4554" ] # Check precidence.
235 "/wd4554", # Check precidence.
236 ]
237 defines += [ 235 defines += [
238 "XP_PC", 236 "XP_PC",
239 "WIN32", 237 "WIN32",
240 "WIN95", 238 "WIN95",
241 "_PR_GLOBAL_THREADS_ONLY", 239 "_PR_GLOBAL_THREADS_ONLY",
242 "_CRT_SECURE_NO_WARNINGS", 240 "_CRT_SECURE_NO_WARNINGS",
243 ] 241 ]
244 } else { 242 } else {
245 sources -= [ 243 sources -= [
246 "nspr/pr/src/md/windows/ntgc.c", 244 "nspr/pr/src/md/windows/ntgc.c",
(...skipping 29 matching lines...) Expand all
276 "nspr/pr/src/md/unix/uxrng.c", 274 "nspr/pr/src/md/unix/uxrng.c",
277 "nspr/pr/src/md/unix/uxshm.c", 275 "nspr/pr/src/md/unix/uxshm.c",
278 "nspr/pr/src/md/unix/uxwrap.c", 276 "nspr/pr/src/md/unix/uxwrap.c",
279 "nspr/pr/src/pthreads/ptio.c", 277 "nspr/pr/src/pthreads/ptio.c",
280 "nspr/pr/src/pthreads/ptmisc.c", 278 "nspr/pr/src/pthreads/ptmisc.c",
281 "nspr/pr/src/pthreads/ptsynch.c", 279 "nspr/pr/src/pthreads/ptsynch.c",
282 "nspr/pr/src/pthreads/ptthread.c", 280 "nspr/pr/src/pthreads/ptthread.c",
283 ] 281 ]
284 } 282 }
285 283
286 if (cpu_arch == "x86") { 284 if (current_cpu == "x86") {
287 defines += [ "_X86_" ] 285 defines += [ "_X86_" ]
288 } else if (cpu_arch == "x64") { 286 } else if (current_cpu == "x64") {
289 defines += [ "_AMD64_" ] 287 defines += [ "_AMD64_" ]
290 } 288 }
291 289
292 if (is_mac || is_ios) { 290 if (is_mac || is_ios) {
293 sources -= [ 291 sources -= [
294 "nspr/pr/src/io/prdir.c", 292 "nspr/pr/src/io/prdir.c",
295 "nspr/pr/src/io/prfile.c", 293 "nspr/pr/src/io/prfile.c",
296 "nspr/pr/src/io/prio.c", 294 "nspr/pr/src/io/prio.c",
297 "nspr/pr/src/io/prsocket.c", 295 "nspr/pr/src/io/prsocket.c",
298 "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
469 "nss/lib/nss", 467 "nss/lib/nss",
470 "nss/lib/pk11wrap", 468 "nss/lib/pk11wrap",
471 "nss/lib/pkcs7", 469 "nss/lib/pkcs7",
472 "nss/lib/pki", 470 "nss/lib/pki",
473 "nss/lib/smime", 471 "nss/lib/smime",
474 "nss/lib/softoken", 472 "nss/lib/softoken",
475 "nss/lib/util", 473 "nss/lib/util",
476 ] 474 ]
477 } 475 }
478 476
479 if (is_win && cpu_arch == "x86") { 477 if (is_win && current_cpu == "x86") {
480 source_set("nss_static_avx") { 478 source_set("nss_static_avx") {
481 sources = [ 479 sources = [
482 "nss/lib/freebl/intel-gcm-wrap.c", 480 "nss/lib/freebl/intel-gcm-wrap.c",
483 "nss/lib/freebl/intel-gcm-x86-masm.asm", 481 "nss/lib/freebl/intel-gcm-x86-masm.asm",
484 "nss/lib/freebl/intel-gcm.h", 482 "nss/lib/freebl/intel-gcm.h",
485 ] 483 ]
486 defines = [ 484 defines = [
487 "_WINDOWS", 485 "_WINDOWS",
488 "_X86_", 486 "_X86_",
489 "INTEL_GCM", 487 "INTEL_GCM",
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 "RIJNDAEL_INCLUDE_TABLES", 897 "RIJNDAEL_INCLUDE_TABLES",
900 "SHLIB_VERSION=\"3\"", 898 "SHLIB_VERSION=\"3\"",
901 "SOFTOKEN_SHLIB_VERSION=\"3\"", 899 "SOFTOKEN_SHLIB_VERSION=\"3\"",
902 ] 900 ]
903 include_dirs = [ 901 include_dirs = [
904 "nss/lib/freebl/mpi", 902 "nss/lib/freebl/mpi",
905 "nss/lib/ssl", 903 "nss/lib/ssl",
906 ] 904 ]
907 905
908 if (is_win) { 906 if (is_win) {
909 cflags += [ 907 cflags += [ "/wd4101" ] # Unreferenced local variable.
910 "/wd4101", # Unreferenced local variable.
911 ]
912 } 908 }
913 909
914 if (include_nss_libpkix) { 910 if (include_nss_libpkix) {
915 sources += [ 911 sources += [
916 "nss/lib/certhigh/certvfypkix.c", 912 "nss/lib/certhigh/certvfypkix.c",
917 "nss/lib/certhigh/certvfypkixprint.c", 913 "nss/lib/certhigh/certvfypkixprint.c",
918 "nss/lib/libpkix/include/pkix.h", 914 "nss/lib/libpkix/include/pkix.h",
919 "nss/lib/libpkix/include/pkix_certsel.h", 915 "nss/lib/libpkix/include/pkix_certsel.h",
920 "nss/lib/libpkix/include/pkix_certstore.h", 916 "nss/lib/libpkix/include/pkix_certstore.h",
921 "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
1091 "nss/lib/libpkix/pkix_pl_nss/system", 1087 "nss/lib/libpkix/pkix_pl_nss/system",
1092 ] 1088 ]
1093 } else { 1089 } else {
1094 defines += [ "NSS_DISABLE_LIBPKIX" ] 1090 defines += [ "NSS_DISABLE_LIBPKIX" ]
1095 } 1091 }
1096 1092
1097 if (!include_nss_root_certs) { 1093 if (!include_nss_root_certs) {
1098 defines += [ "NSS_DISABLE_ROOT_CERTS" ] 1094 defines += [ "NSS_DISABLE_ROOT_CERTS" ]
1099 } 1095 }
1100 1096
1101 if (cpu_arch == "x64" && !is_win) { 1097 if (current_cpu == "x64" && !is_win) {
1102 sources -= [ 1098 sources -= [
1103 "nss/lib/freebl/chacha20/chacha20.c", 1099 "nss/lib/freebl/chacha20/chacha20.c",
1104 "nss/lib/freebl/poly1305/poly1305.c", 1100 "nss/lib/freebl/poly1305/poly1305.c",
1105 ] 1101 ]
1106 } else { 1102 } else {
1107 sources -= [ 1103 sources -= [
1108 "nss/lib/freebl/chacha20/chacha20_vec.c", 1104 "nss/lib/freebl/chacha20/chacha20_vec.c",
1109 "nss/lib/freebl/poly1305/poly1305-donna-x64-sse2-incremental-source.c", 1105 "nss/lib/freebl/poly1305/poly1305-donna-x64-sse2-incremental-source.c",
1110 ] 1106 ]
1111 } 1107 }
(...skipping 24 matching lines...) Expand all
1136 if (is_win) { 1132 if (is_win) {
1137 defines += [ 1133 defines += [
1138 "SHLIB_SUFFIX=\"dll\"", 1134 "SHLIB_SUFFIX=\"dll\"",
1139 "SHLIB_PREFIX=\"\"", 1135 "SHLIB_PREFIX=\"\"",
1140 "SOFTOKEN_LIB_NAME=\"softokn3.dll\"", 1136 "SOFTOKEN_LIB_NAME=\"softokn3.dll\"",
1141 "XP_PC", 1137 "XP_PC",
1142 "WIN32", 1138 "WIN32",
1143 "WIN95", 1139 "WIN95",
1144 ] 1140 ]
1145 1141
1146 if (cpu_arch == "x86") { 1142 if (current_cpu == "x86") {
1147 defines += [ 1143 defines += [
1148 "NSS_X86_OR_X64", 1144 "NSS_X86_OR_X64",
1149 "NSS_X86", 1145 "NSS_X86",
1150 "_X86_", 1146 "_X86_",
1151 "MP_ASSEMBLY_MULTIPLY", 1147 "MP_ASSEMBLY_MULTIPLY",
1152 "MP_ASSEMBLY_SQUARE", 1148 "MP_ASSEMBLY_SQUARE",
1153 "MP_ASSEMBLY_DIV_2DX1D", 1149 "MP_ASSEMBLY_DIV_2DX1D",
1154 "MP_USE_UINT_DIGIT", 1150 "MP_USE_UINT_DIGIT",
1155 "MP_NO_MP_WORD", 1151 "MP_NO_MP_WORD",
1156 "USE_HW_AES", 1152 "USE_HW_AES",
1157 "INTEL_GCM", 1153 "INTEL_GCM",
1158 ] 1154 ]
1159 sources -= [ "nss/lib/freebl/mpi/mpi_amd64.c" ] 1155 sources -= [ "nss/lib/freebl/mpi/mpi_amd64.c" ]
1160 } else if (cpu_arch == "x64") { 1156 } else if (current_cpu == "x64") {
1161 sources -= [ 1157 sources -= [
1162 "nss/lib/freebl/intel-aes-x86-masm.asm", 1158 "nss/lib/freebl/intel-aes-x86-masm.asm",
1163 "nss/lib/freebl/mpi/mpi_amd64.c", 1159 "nss/lib/freebl/mpi/mpi_amd64.c",
1164 "nss/lib/freebl/mpi/mpi_x86_asm.c", 1160 "nss/lib/freebl/mpi/mpi_x86_asm.c",
1165 ] 1161 ]
1166 defines += [ 1162 defines += [
1167 "NSS_USE_64", 1163 "NSS_USE_64",
1168 "NSS_X86_OR_X64", 1164 "NSS_X86_OR_X64",
1169 "NSS_X64", 1165 "NSS_X64",
1170 "_AMD64_", 1166 "_AMD64_",
(...skipping 30 matching lines...) Expand all
1201 } 1197 }
1202 1198
1203 public_deps = [ 1199 public_deps = [
1204 ":nspr", 1200 ":nspr",
1205 ] 1201 ]
1206 deps = [ 1202 deps = [
1207 ":nspr", 1203 ":nspr",
1208 "//third_party/sqlite", 1204 "//third_party/sqlite",
1209 ] 1205 ]
1210 1206
1211 if (is_win && cpu_arch == "x86") { 1207 if (is_win && current_cpu == "x86") {
1212 deps += [ ":nss_static_avx" ] 1208 deps += [ ":nss_static_avx" ]
1213 } 1209 }
1214 } 1210 }
1215 } # Windows/Mac/iOS. 1211 } # Windows/Mac/iOS.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698