pw_build: Support specifying final link dependencies

- pw_build_LINK_DEPS is a list of build targets that are linked into
  all build artifacts produced by pw_executable, pw_static_library, and
  pw_shared_library.
- Add a ":deps" group to the pw_assert build interface. Require
  $dir_pw_assert:deps to be listed in pw_build_LINK_DEPS if
  pw_assert_BACKEND is set.

Change-Id: Icc01dbe86f95d971e76aa357c7b7174ce85546ba
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/43521
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Reviewed-by: Armando Montanez <amontanez@google.com>
diff --git a/pw_build/docs.rst b/pw_build/docs.rst
index 6135755..ad43bff 100644
--- a/pw_build/docs.rst
+++ b/pw_build/docs.rst
@@ -72,6 +72,21 @@
 All of the ``pw_*`` target type overrides accept any arguments, as they simply
 forward them through to the underlying target.
 
+.. _module-pw_build-link-deps:
+
+Link-only deps
+--------------
+It may be necessary to specify additional link-time dependencies that may not be
+explicitly depended on elsewhere in the build. One example of this is a
+``pw_assert`` backend, which may need to leave out dependencies to avoid
+circular dependencies. Its dependencies need to be linked for executables and
+libraries, even if they aren't pulled in elsewhere.
+
+The ``pw_build_LINK_DEPS`` build arg is a list of dependencies to add to all
+``pw_executable``, ``pw_static_library``, and ``pw_shared_library`` targets.
+This should only be used as a last resort when dependencies cannot be properly
+expressed in the build.
+
 Python packages
 ---------------
 GN templates for :ref:`Python build automation <docs-python-build>` are