0

Rename //build/config/linux/nss and fix comments

Historically, we used a combination of bundled OpenSSL/BoringSSL,
bundled NSS, and system NSS on different platforms (including a time
when we bundled part of NSS and sourced the rest from the system). Some
of the comments and target name reflected that. Things are simpler now.
See bug.

In //chromeos, it seems the dependency was not actually needed, so I've
removed it. (NSS is used in parts of //chromeos, but only in
subdirectories. Those seem to be pulling it in via //crypto:platform,
which I've left a TODO to tidy up.)

Bug: 1227773
Change-Id: I089f868f0ac012f7a87d8928a4e3cbd931d9ba9d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3309100
Reviewed-by: Matt Mueller <mattm@chromium.org>
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: Brian Geffon <bgeffon@chromium.org>
Commit-Queue: David Benjamin <davidben@chromium.org>
Cr-Commit-Position: refs/heads/main@{#947206}
This commit is contained in:
David Benjamin
2021-12-01 22:03:44 +00:00
committed by Chromium LUCI CQ
parent 3286abcdfe
commit 28e5940d2a
5 changed files with 16 additions and 30 deletions
build/config/linux/nss
chromeos
BUILD.gn
memory
BUILD.gn
userspace_swap
crypto

@ -5,14 +5,10 @@
import("//build/config/linux/pkg_config.gni")
if (is_linux || is_chromeos) {
# This is a dependency on NSS with no libssl. On Linux we use a built-in SSL
# library but the system NSS libraries. Non-Linux platforms using NSS use the
# hermetic one in //third_party/nss.
#
# Generally you should depend on //crypto:platform instead of using this
# config since that will properly pick up NSS or OpenSSL depending on
# platform and build config.
pkg_config("system_nss_no_ssl_config") {
# This is a dependency on NSS with no libssl3. On Linux and Chrome OS, we use
# NSS for platform certificate integration. We use our own TLS library, so
# exclude the one from NSS.
pkg_config("nss") {
packages = [ "nss" ]
extra_args = [
"-v",

@ -27,10 +27,7 @@ component("chromeos") {
sources = []
if (is_chromeos_ash) {
configs += [
":chromeos_implementation",
"//build/config/linux/nss:system_nss_no_ssl_config",
]
configs += [ ":chromeos_implementation" ]
if (is_chromeos_device) {
configs += [ "//build/config/compiler:use_orderfile_for_hugepage" ]
}
@ -130,10 +127,7 @@ source_set("test_utils") {
}
test("chromeos_unittests") {
configs += [
"//build/config/linux/dbus",
"//build/config/linux/nss:system_nss_no_ssl_config",
]
configs += [ "//build/config/linux/dbus" ]
deps = [
"//base/test:test_support",

@ -14,10 +14,7 @@ config("chromeos_implementation") {
component("memory") {
defines = [ "IS_CHROMEOS_MEMORY_IMPL" ]
configs += [
":chromeos_implementation",
"//build/config/linux/nss:system_nss_no_ssl_config",
]
configs += [ ":chromeos_implementation" ]
deps = [
"//base",
"//chromeos:chromeos_export",
@ -45,7 +42,6 @@ component("memory") {
source_set("unit_tests") {
testonly = true
configs += [ "//build/config/linux/nss:system_nss_no_ssl_config" ]
deps = [
":memory",
"//base/test:test_support",

@ -23,10 +23,7 @@ mojom("mojom") {
}
component("userspace_swap") {
configs += [
":chromeos_implementation",
"//build/config/linux/nss:system_nss_no_ssl_config",
]
configs += [ ":chromeos_implementation" ]
deps = [
":mojom",
"//base",
@ -56,7 +53,6 @@ component("userspace_swap") {
source_set("unit_tests") {
testonly = true
configs += [ "//build/config/linux/nss:system_nss_no_ssl_config" ]
deps = [
":mojom",
":userspace_swap",

@ -203,15 +203,19 @@ static_library("test_support") {
]
}
# This is a meta-target that forwards to NSS's SSL library or OpenSSL,
# according to the state of the crypto flags. A target just wanting to depend
# on the current SSL library should just depend on this.
# This target historically abstracted between different cryptography and TLS
# libraries. Now we always use //third_party/boringssl for cryptography and TLS.
# On Linux and Chrome OS, we additionally use //build/config/linux/nss for some
# certificate-related platform integration points. Depend on one or both of the
# individual targets instead of this one.
#
# TODO(https://crbug.com/1275165): Remove this target.
group("platform") {
public_deps = [ "//third_party/boringssl" ]
# Link in NSS if it is used for the platform certificate library
# (use_nss_certs).
if (use_nss_certs) {
public_configs = [ "//build/config/linux/nss:system_nss_no_ssl_config" ]
public_configs = [ "//build/config/linux/nss" ]
}
}