aboutsummaryrefslogtreecommitdiff
path: root/pw_build
diff options
context:
space:
mode:
authorArmando Montanez <amontanez@google.com>2023-11-01 00:16:44 +0000
committerCQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-11-01 00:16:44 +0000
commit050c2211536b89e0ec9e419cef91c7bc60b339ab (patch)
tree73080cab9de6cf1698fd8e5cc77c7f3061ea7806 /pw_build
parentcde4af63efd7b35087dc2dc7b0ebadab26d04e27 (diff)
downloadpigweed-050c2211536b89e0ec9e419cef91c7bc60b339ab.tar.gz
pw_build: Add empty_cc_library
Adds an analog to GN's $dir_pw_build:empty target to the Bazel build. Change-Id: I31f5994f597e57cc2f03b7fd01ba949d532f2e95 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/178555 Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> Pigweed-Auto-Submit: Armando Montanez <amontanez@google.com> Reviewed-by: Ted Pudlik <tpudlik@google.com> Commit-Queue: Auto-Submit <auto-submit@pigweed-service-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'pw_build')
-rw-r--r--pw_build/BUILD.bazel14
-rw-r--r--pw_build/bazel.rst15
2 files changed, 26 insertions, 3 deletions
diff --git a/pw_build/BUILD.bazel b/pw_build/BUILD.bazel
index cc7d1a145..6ee0e3890 100644
--- a/pw_build/BUILD.bazel
+++ b/pw_build/BUILD.bazel
@@ -72,9 +72,17 @@ pw_cc_test(
],
)
-# Special target that may be used instead of a cc_library as the default
-# condition in backend multiplexer select statements. This produces better
-# error messages than e.g. using an invalid label.
+# This empty library is used as a placeholder for label flags that need to
+# point to a library of some kind, but don't actually need the dependency to
+# amount to anything.
+cc_library(
+ name = "empty_cc_library",
+)
+
+# A special target used instead of a cc_library as the default condition in
+# backend multiplexer select statements to signal that a facade is in an
+# unconfigured state. This produces better error messages than e.g. using an
+# invalid label.
#
# If you're a user whose build errored out because a library transitively
# depended on this target: the platform you're targeting did not specify which
diff --git a/pw_build/bazel.rst b/pw_build/bazel.rst
index ec3ac9818..abec75ff2 100644
--- a/pw_build/bazel.rst
+++ b/pw_build/bazel.rst
@@ -330,6 +330,21 @@ Example
} // namespace my::stuff
+Miscellaneous utilities
+-----------------------
+empty_cc_library
+^^^^^^^^^^^^^^^^
+This empty library is used as a placeholder for label flags that need to point
+to a library of some kind, but don't actually need the dependency to amount to
+anything.
+
+unspecified_backend
+^^^^^^^^^^^^^^^^^^^
+A special target used instead of a cc_library as the default condition in
+backend multiplexer select statements to signal that a facade is in an
+unconfigured state. This produces better error messages than e.g. using an
+invalid label.
+
Toolchains and platforms
------------------------
Pigweed provides clang-based host toolchains for Linux and Mac Arm gcc