summaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/bazel.mk4
-rw-r--r--tools/show_paths.bzl2
2 files changed, 4 insertions, 2 deletions
diff --git a/tools/bazel.mk b/tools/bazel.mk
index 4f979bbeb..1444423e4 100644
--- a/tools/bazel.mk
+++ b/tools/bazel.mk
@@ -186,8 +186,8 @@ build_paths = \
(set -euo pipefail; \
$(call wrapper,$(BAZEL) build $(BASE_OPTIONS) $(BAZEL_OPTIONS) $(1)) && \
$(call wrapper,$(BAZEL) cquery $(BASE_OPTIONS) $(BAZEL_OPTIONS) $(1) --output=starlark --starlark:file=tools/show_paths.bzl) \
- | xargs -r -n 1 -I {} readlink -f "{}" \
- | xargs -r -n 1 -I {} bash -c 'set -xeuo pipefail; $(2)')
+ | xargs -r -n 1 -I {} bash -c 'test -e "{}" || exit 0; readlink -f "{}"' \
+ | xargs -r -n 1 -I {} bash -c 'set -euo pipefail; $(2)')
clean = $(call header,CLEAN) && $(call wrapper,$(BAZEL) clean)
build = $(call header,BUILD $(1)) && $(call build_paths,$(1),echo {})
diff --git a/tools/show_paths.bzl b/tools/show_paths.bzl
index ba78d3494..f0126ac7b 100644
--- a/tools/show_paths.bzl
+++ b/tools/show_paths.bzl
@@ -2,6 +2,8 @@
def format(target):
provider_map = providers(target)
+ if not provider_map:
+ return ""
outputs = dict()
# Try to resolve in order.