Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bazel: add target_compatible_with to envoy_cc_library
This attribute allows us to specify what constraints a library is compatible with, such as only usable on linux, or not windows etc. It is viral in that any targets that explicitly depend on it up the tree will respect those constraints, and not be built, unless they're specified explicitly on the command line, in which case bazel will fail instead. This helps us a fix a problem with the compilation database script where it virtually does `bazel build //...`, but some libraries don't build at all on some platforms. Theoretically we could also solve this case by marking those libraries as `manual`, but that would have other side effects in that they wouldn't be built on the platforms that they support either (unless they were somehow otherwise part of the dependency tree, since unlike this attribute, the `manual` tag is not viral). Signed-off-by: Keith Smiley <keithbsmiley@gmail.com>
- Loading branch information