summaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/bazel.mk7
-rw-r--r--tools/github/BUILD2
-rw-r--r--tools/github/nogo/BUILD2
-rw-r--r--tools/github/reviver/BUILD2
-rwxr-xr-xtools/go_branch.sh2
-rw-r--r--tools/rules_go_symbols.patch10
6 files changed, 12 insertions, 13 deletions
diff --git a/tools/bazel.mk b/tools/bazel.mk
index fb0fc6524..60b50cfb0 100644
--- a/tools/bazel.mk
+++ b/tools/bazel.mk
@@ -75,6 +75,7 @@ UID := $(shell id -u ${USER})
GID := $(shell id -g ${USER})
USERADD_OPTIONS :=
DOCKER_RUN_OPTIONS :=
+DOCKER_RUN_OPTIONS += --rm
DOCKER_RUN_OPTIONS += --user $(UID):$(GID)
DOCKER_RUN_OPTIONS += --entrypoint ""
DOCKER_RUN_OPTIONS += --init
@@ -160,15 +161,13 @@ 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.
ifneq (true,$(shell $(wrapper echo true)))
bazel-server: bazel-image ## Ensures that the server exists.
@$(call header,DOCKER RUN)
@docker rm -f $(DOCKER_NAME) 2>/dev/null || true
- @mkdir -p $(GCLOUD_CONFIG)
@mkdir -p $(BAZEL_CACHE)
- @docker run -d --rm --name $(DOCKER_NAME) \
+ @mkdir -p $(GCLOUD_CONFIG)
+ @docker run -d --name $(DOCKER_NAME) \
-v "$(CURDIR):$(CURDIR)" \
--workdir "$(CURDIR)" \
$(DOCKER_RUN_OPTIONS) \
diff --git a/tools/github/BUILD b/tools/github/BUILD
index aad088d13..7d0a179f7 100644
--- a/tools/github/BUILD
+++ b/tools/github/BUILD
@@ -9,7 +9,7 @@ go_binary(
deps = [
"//tools/github/nogo",
"//tools/github/reviver",
- "@com_github_google_go_github_v28//github:go_default_library",
+ "@com_github_google_go_github_v32//github:go_default_library",
"@org_golang_x_oauth2//:go_default_library",
],
)
diff --git a/tools/github/nogo/BUILD b/tools/github/nogo/BUILD
index 19b7eec4d..4259fe94c 100644
--- a/tools/github/nogo/BUILD
+++ b/tools/github/nogo/BUILD
@@ -11,6 +11,6 @@ go_library(
],
deps = [
"//tools/nogo",
- "@com_github_google_go_github_v28//github:go_default_library",
+ "@com_github_google_go_github_v32//github:go_default_library",
],
)
diff --git a/tools/github/reviver/BUILD b/tools/github/reviver/BUILD
index 7d78480a7..fc54782f5 100644
--- a/tools/github/reviver/BUILD
+++ b/tools/github/reviver/BUILD
@@ -12,7 +12,7 @@ go_library(
visibility = [
"//tools/github:__subpackages__",
],
- deps = ["@com_github_google_go_github_v28//github:go_default_library"],
+ deps = ["@com_github_google_go_github_v32//github:go_default_library"],
)
go_test(
diff --git a/tools/go_branch.sh b/tools/go_branch.sh
index e89a8b098..392e40619 100755
--- a/tools/go_branch.sh
+++ b/tools/go_branch.sh
@@ -48,7 +48,7 @@ readonly module origpwd othersrc
# Build an amd64 & arm64 gopath.
declare -r go_amd64="${tmp_dir}/amd64"
declare -r go_arm64="${tmp_dir}/arm64"
-make build BAZEL_OPTIONS="" TARGETS="//:gopath" 2>/dev/null
+make build BAZEL_OPTIONS="" TARGETS="//:gopath"
rsync --recursive --delete --copy-links bazel-bin/gopath/ "${go_amd64}"
make build BAZEL_OPTIONS=--config=cross-aarch64 TARGETS="//:gopath" 2>/dev/null
rsync --recursive --delete --copy-links bazel-bin/gopath/ "${go_arm64}"
diff --git a/tools/rules_go_symbols.patch b/tools/rules_go_symbols.patch
index 5e1e87084..46767f169 100644
--- a/tools/rules_go_symbols.patch
+++ b/tools/rules_go_symbols.patch
@@ -2,13 +2,13 @@ diff --git a/go/private/rules/test.bzl b/go/private/rules/test.bzl
index 17516ad7..76b6c68c 100644
--- a/go/private/rules/test.bzl
+++ b/go/private/rules/test.bzl
-@@ -121,9 +121,6 @@ def _go_test_impl(ctx):
+@@ -117,9 +117,6 @@ def _go_test_impl(ctx):
)
-
+
test_gc_linkopts = gc_linkopts(ctx)
- if not go.mode.debug:
- # Disable symbol table and DWARF generation for test binaries.
- test_gc_linkopts.extend(["-s", "-w"])
-
- # Now compile the test binary itself
- test_library = GoLibrary(
+
+ # Link in the run_dir global for bzltestutil
+ test_gc_linkopts.extend(["-X", "github.com/bazelbuild/rules_go/go/tools/bzltestutil.RunDir=" + run_dir])