mirror of
https://github.com/hanzoai/visor.git
synced 2026-09-24 17:04:14 +00:00
Using the newer bazel rules necessitates a transition from proto1 to proto2. In order to resolve the incompatibility between proto2 and gogoproto, the cri runtimeoptions proto must be vendored. Further, some of the semantics of bazel caching changed during the transition. It is now necessary to: - Ensure that :gopath depends only on pure library targets, as the propagation of go_binary build attributes (pure, static) will affected the generated files (though content remains the same, there are conflicts with respect to the gopath). - Update bazel.mk to include the possibility of binaries in the bazel-out directory, as it will now put runsc and others there. This required some refinements to the mechanism of extracting paths, since some the existing regex resulted in false positives. - Change nogo rules to prevent escape generation on binary targets. For some reason, the newer version of bazel attempted to run the nogo analysis on the binary targets, which fails due to the fact that objdump does not work on the final binary. This must be due to a change in the semantics of aspects in bazel3. PiperOrigin-RevId: 337958324
15 lines
478 B
Diff
15 lines
478 B
Diff
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):
|
|
)
|
|
|
|
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(
|