Skip to content

Commit

Permalink
Fix sanitizer builds
Browse files Browse the repository at this point in the history
 #ci:bpf-build

Signed-off-by: Vihang Mehta <vihang@pixielabs.ai>
  • Loading branch information
vihangm committed Feb 3, 2023
1 parent 38ec70e commit c704dd0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bazel/external/rules_go.patch
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
diff --git a/go/private/actions/stdlib.bzl b/go/private/actions/stdlib.bzl
index 03acd304..78995d1b 100644
index 11a8278f..7346aecd 100644
--- a/go/private/actions/stdlib.bzl
+++ b/go/private/actions/stdlib.bzl
@@ -92,7 +92,7 @@ def _build_stdlib(go):
@@ -92,7 +92,8 @@ def _build_stdlib(go):
ldflags = [
option
for option in extldflags_from_cc_toolchain(go)
- if option not in ("-lstdc++", "-lc++")
+ if option not in ("-lstdc++", "-lc++", "-l:libstdc++.a", "-l:libc++.a", "-l:libc++abi.a")
+ if option not in ("-lstdc++", "-lc++", "-l:libstdc++.a", "-l:libc++.a", "-l:libc++abi.a") and
+ not (option.startswith("-fsanitize") or option.startswith("-fno-sanitize"))
]
env.update({
"CGO_ENABLED": "1",

0 comments on commit c704dd0

Please sign in to comment.