diff options
author | Adin Scannell <ascannell@google.com> | 2021-01-08 18:01:05 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-01-08 18:03:17 -0800 |
commit | 0c99ab70905fa4eaf8bc7b0ca846e12d7bbc6e39 (patch) | |
tree | 426d2500979192e3d32778bdb492f54119303856 /tools/bazel.mk | |
parent | 70de1db82e9d3b2c4491031f1f8a9c5a5830c7c0 (diff) |
Support releasing aarch64 builds.
This change works around an issue in rules_pkg, described here:
https://github.com/bazelbuild/rules_pkg/pull/263
PiperOrigin-RevId: 350869030
Diffstat (limited to 'tools/bazel.mk')
-rw-r--r-- | tools/bazel.mk | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/bazel.mk b/tools/bazel.mk index 7e06d09be..0a10bcddf 100644 --- a/tools/bazel.mk +++ b/tools/bazel.mk @@ -160,6 +160,12 @@ bazel-image: load-default ## Ensures that the local builder exists. @docker commit $(BUILDER_NAME) gvisor.dev/images/builder >&2 .PHONY: bazel-image +# Note: when starting the bazel server, we tie the life of the container to the +# bazel server's life, so that the container disappears naturally. We also call +# bazel shutdown prior to startup, to ensure that any existing bazel instance in +# the workspace (perhaps of a different architecture) stops. If the instance is +# compatible and the container is already running, then the wrapper if statement +# here will succeed, and we wouldn't have needed a new server at all. ifneq (true,$(shell $(wrapper echo true))) bazel-server: bazel-image ## Ensures that the server exists. @$(call header,DOCKER RUN) @@ -171,7 +177,7 @@ bazel-server: bazel-image ## Ensures that the server exists. --workdir "$(CURDIR)" \ $(DOCKER_RUN_OPTIONS) \ gvisor.dev/images/builder \ - bash -c "set -x; tail -f --pid=\$$($(BAZEL) info server_pid) /dev/null" >&2 + bash -c "set -x; $(BAZEL) shutdown; tail -f --pid=\$$($(BAZEL) info server_pid) /dev/null" else bazel-server: @ |