| OLD | NEW |
| 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 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 config("nss_static_config_private") { |
| 478 if (is_clang) { |
| 479 cflags = [ |
| 480 # nss doesn"t explicitly cast between different enum types. |
| 481 "-Wno-conversion", |
| 482 |
| 483 # nss passes "const char*" through "void*". |
| 484 "-Wno-incompatible-pointer-types", |
| 485 |
| 486 # nss prefers `a && b || c` over `(a && b) || c`. |
| 487 "-Wno-logical-op-parentheses", |
| 488 |
| 489 # nss doesn"t use exhaustive switches on enums |
| 490 "-Wno-switch", |
| 491 |
| 492 # nss has some `unsigned < 0` checks. |
| 493 "-Wno-tautological-compare", |
| 494 |
| 495 # nss-urandom-abort.patch removed the only call to rng_systemFromNoise |
| 496 "-Wno-unused-function", |
| 497 ] |
| 498 } |
| 499 } |
| 500 |
| 477 if (is_win && current_cpu == "x86") { | 501 if (is_win && current_cpu == "x86") { |
| 478 source_set("nss_static_avx") { | 502 source_set("nss_static_avx") { |
| 479 sources = [ | 503 sources = [ |
| 480 "nss/lib/freebl/intel-gcm-wrap.c", | 504 "nss/lib/freebl/intel-gcm-wrap.c", |
| 481 "nss/lib/freebl/intel-gcm-x86-masm.asm", | 505 "nss/lib/freebl/intel-gcm-x86-masm.asm", |
| 482 "nss/lib/freebl/intel-gcm.h", | 506 "nss/lib/freebl/intel-gcm.h", |
| 483 ] | 507 ] |
| 484 defines = [ | 508 defines = [ |
| 485 "_WINDOWS", | 509 "_WINDOWS", |
| 486 "_X86_", | 510 "_X86_", |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 884 configs -= [ "//build/config/compiler:chromium_code" ] | 908 configs -= [ "//build/config/compiler:chromium_code" ] |
| 885 if (is_win) { | 909 if (is_win) { |
| 886 configs -= [ "//build/config/win:unicode" ] # Requires 8-bit mode. | 910 configs -= [ "//build/config/win:unicode" ] # Requires 8-bit mode. |
| 887 } | 911 } |
| 888 configs += [ | 912 configs += [ |
| 889 "//build/config/compiler:no_chromium_code", | 913 "//build/config/compiler:no_chromium_code", |
| 890 "//build/config/compiler:no_size_t_to_int_warning", | 914 "//build/config/compiler:no_size_t_to_int_warning", |
| 891 | 915 |
| 892 # nss passes "const char*" through "void*". | 916 # nss passes "const char*" through "void*". |
| 893 "//build/config/compiler:no_incompatible_pointer_warnings", | 917 "//build/config/compiler:no_incompatible_pointer_warnings", |
| 918 ":nss_static_config_private", |
| 894 ] | 919 ] |
| 895 public_configs = [ ":nss_static_config" ] | 920 public_configs = [ ":nss_static_config" ] |
| 896 | 921 |
| 897 cflags = [] | 922 cflags = [] |
| 898 | 923 |
| 899 # Only need the defines and includes not in nss_static_config. | 924 # Only need the defines and includes not in nss_static_config. |
| 900 defines = [ | 925 defines = [ |
| 901 "MP_API_COMPATIBLE", | 926 "MP_API_COMPATIBLE", |
| 902 "NSS_DISABLE_DBM", | 927 "NSS_DISABLE_DBM", |
| 903 "RIJNDAEL_INCLUDE_TABLES", | 928 "RIJNDAEL_INCLUDE_TABLES", |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1176 } | 1201 } |
| 1177 } else { | 1202 } else { |
| 1178 # Not Windows. | 1203 # Not Windows. |
| 1179 sources -= [ | 1204 sources -= [ |
| 1180 # mpi_x86_asm.c contains MSVC inline assembly code. | 1205 # mpi_x86_asm.c contains MSVC inline assembly code. |
| 1181 "nss/lib/freebl/intel-aes-x86-masm.asm", | 1206 "nss/lib/freebl/intel-aes-x86-masm.asm", |
| 1182 "nss/lib/freebl/mpi/mpi_x86_asm.c", | 1207 "nss/lib/freebl/mpi/mpi_x86_asm.c", |
| 1183 ] | 1208 ] |
| 1184 } | 1209 } |
| 1185 | 1210 |
| 1186 if (is_clang) { | |
| 1187 cflags += [ | |
| 1188 # nss doesn"t explicitly cast between different enum types. | |
| 1189 "-Wno-conversion", | |
| 1190 | |
| 1191 # nss passes "const char*" through "void*". | |
| 1192 "-Wno-incompatible-pointer-types", | |
| 1193 | |
| 1194 # nss prefers `a && b || c` over `(a && b) || c`. | |
| 1195 "-Wno-logical-op-parentheses", | |
| 1196 | |
| 1197 # nss doesn"t use exhaustive switches on enums | |
| 1198 "-Wno-switch", | |
| 1199 | |
| 1200 # nss has some `unsigned < 0` checks. | |
| 1201 "-Wno-tautological-compare", | |
| 1202 | |
| 1203 # nss-urandom-abort.patch removed the only call to rng_systemFromNoise | |
| 1204 "-Wno-unused-function", | |
| 1205 ] | |
| 1206 } | |
| 1207 | |
| 1208 public_deps = [ | 1211 public_deps = [ |
| 1209 ":nspr", | 1212 ":nspr", |
| 1210 ] | 1213 ] |
| 1211 deps = [ | 1214 deps = [ |
| 1212 ":nspr", | 1215 ":nspr", |
| 1213 "//third_party/sqlite", | 1216 "//third_party/sqlite", |
| 1214 ] | 1217 ] |
| 1215 | 1218 |
| 1216 if (is_win && current_cpu == "x86") { | 1219 if (is_win && current_cpu == "x86") { |
| 1217 deps += [ ":nss_static_avx" ] | 1220 deps += [ ":nss_static_avx" ] |
| 1218 } | 1221 } |
| 1219 } | 1222 } |
| 1220 } # Windows/Mac/iOS. | 1223 } # Windows/Mac/iOS. |
| OLD | NEW |